Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - io_notify: (1 Item)
   
io_notify  
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