-extern int SIwait( struct ginfo_blk *gptr ) {
- int fd; // file descriptor for use in this routine
- int ((*cbptr)()); // pointer to callback routine to call
- int status = SI_OK; // return status
- int addrlen; // length of address from recvfrom call
- int i; // loop index
- struct tp_blk *tpptr; // pointer at tp stuff
- struct tp_blk *nextone; // point at next block to process in loop
- int pstat; // poll status
- struct timeval timeout; // delay to use on select call
- char *buf;
- char *ibuf;
-
- ibuf = (char *) malloc( 2048 );
-
- if( gptr->flags & GIF_SHUTDOWN ) { // cannot do if we should shutdown
- free( ibuf );
- return SI_ERROR; // so just get out
- }