Wim Hellenthal
04/28/2010 9:06 AM
post52987
|
I'm having a resource manager client waiting for an event using select.
The resource manager has the following routine:
int io_notify(resmgr_context_t *ctp, io_notify_t *msg, RESMGR_OCB_T *ocb)
{
static bool first_time = true;
int trig;
trig = _NOTIFY_COND_OUTPUT;
if ( first_time )
{
trig |= _NOTIFY_COND_INPUT;
first_time = false;
}
return (iofunc_notify(ctp, msg, ((PExAttrib)ocb)->notify, trig, NULL, NULL));
}
I notice that the event gets delivered to the client when connecting for the first time This is what I expected since
the trigger _NOTIFY_COND_INPUT is set the first time.
However calling the iofunc_notify_trigger routine doesn't do anything. I call this routine whenever I write to the
resource manager to inform the client that new data is available. the call looks like this:
iofunc_notify_trigger(((PExAttrib)ocb)->notify, 1, IOFUNC_NOTIFY_INPUT);
I notice that the notify structure has an empty list and a bogus cnt value:
notify[0] : cnt=2147483647
list=0x00000000
what can be the reason for this. It looks as if the notify structure is not correctly setup by the iofunc_notify routine
|
|
|