Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

SOFIAPUBFUN int su_wait_mask ( su_wait_t waitobj,
su_socket_t  s,
int  events 
)

Set event mask.

The function su_wait_mask() sets the mask describing events that can signal the wait object.

Parameters:
waitobjpointer to wait object
ssocket
eventsnew event mask
Return values:
0when successful,
-1upon an error.

Definition at line 299 of file su_wait.c.

References su_wait_mask().

Referenced by su_source_eventmask(), and su_wait_mask().

{
#if SU_HAVE_WINSOCK
  HANDLE e = *waitobj;

  if (WSAEventSelect(s, e, events) != 0) {
    int error = WSAGetLastError();
    WSACloseEvent(e);
    WSASetLastError(error);
    return -1;
  }

#elif SU_HAVE_POLL || HAVE_SELECT
  waitobj->fd = s;
  waitobj->events = events;
  waitobj->revents = 0;
#endif

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index