struct tp_blk *nextone= NULL; // point at next block to process in loop
int pstat = 0; // poll status
struct timeval timeout; // delay to use on select call
- char *buf = NULL;
- char *ibuf = NULL;
if( gptr->magicnum != MAGICNUM ) { // if not a valid ginfo block
rmr_vlog( RMR_VL_CRIT, "SI95: wait: bad global info struct magic number is wrong\n" );
return SI_ERROR; // so just get out
}
- if( ( ibuf = (char *) malloc( 2048 ) ) == NULL ) {
- rmr_vlog( RMR_VL_WARN, "ibuf malloc fail\n" );
- return SI_ERROR;
- }
-
do { // spin until a callback says to stop (likely never)
timeout.tv_sec = 0; // must be reset on every call!
timeout.tv_usec = SI_SELECT_TIMEOUT;
}
} while( gptr->tplist != NULL && !(gptr->flags & GIF_SHUTDOWN) );
- free( ibuf );
if( gptr->tplist == NULL ) // indicate all fds closed
if( gptr->flags & GIF_SHUTDOWN ) { // we need to stop for some reason