Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/main/pjlib/src/pj/sock_select.c

    • Property svn:keywords set to Author
    r1 r3  
    1 /* $Header: /pjproject-0.3/pjlib/src/pj/sock_select.c 4     10/14/05 12:26a Bennylp $ */ 
    2 /* $Log: /pjproject-0.3/pjlib/src/pj/sock_select.c $ 
    3  *  
    4  * 4     10/14/05 12:26a Bennylp 
    5  * Finished error code framework, some fixes in ioqueue, etc. Pretty 
    6  * major. 
    7  *  
    8  * 3     9/21/05 1:39p Bennylp 
    9  * Periodic checkin for backup. 
    10  *  
    11  * 2     9/17/05 10:37a Bennylp 
    12  * Major reorganization towards version 0.3. 
    13  *  
    14  * 1     9/15/05 8:40p Bennylp 
    15  * Created. 
     1/* $Id$ 
     2 * 
    163 */ 
    174#include <pj/sock_select.h> 
     
    218#include <pj/errno.h> 
    229 
     10#if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H!=0 
     11#   include <string.h> 
     12#endif 
    2313 
    2414#ifdef _MSC_VER 
     
    2616#endif 
    2717 
    28 #define PART_FDSET(p_fdsetp)    ((fd_set*)&p_fdsetp->data[1]) 
    29 #define PART_COUNT(p_fdsetp)    (p_fdsetp->data[0]) 
     18#define PART_FDSET(ps)          ((fd_set*)&ps->data[1]) 
     19#define PART_FDSET_OR_NULL(ps)  (ps ? PART_FDSET(ps) : NULL) 
     20#define PART_COUNT(ps)          (ps->data[0]) 
    3021 
    3122PJ_DEF(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp) 
     
    9687    } 
    9788 
    98     return select(n, PART_FDSET(readfds), PART_FDSET(writefds), 
    99                   PART_FDSET(exceptfds), p_os_timeout); 
     89    return select(n, PART_FDSET_OR_NULL(readfds), PART_FDSET_OR_NULL(writefds), 
     90                  PART_FDSET_OR_NULL(exceptfds), p_os_timeout); 
    10091} 
    10192 
Note: See TracChangeset for help on using the changeset viewer.