Changeset 248


Ignore:
Timestamp:
Feb 27, 2006 11:54:58 PM (18 years ago)
Author:
bennylp
Message:

Changed pjsip_endpt_handle_events() to return pj_status_t instead of void

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_endpoint.h

    r230 r248  
    109109 * @param max_timeout   Maximum time to wait for events, or NULL to wait forever 
    110110 *                      until event is received. 
    111  */ 
    112 PJ_DECL(void) pjsip_endpt_handle_events( pjsip_endpoint *endpt,  
    113                                          const pj_time_val *max_timeout); 
     111 * 
     112 * @return              PJ_SUCCESS on success. 
     113 */ 
     114PJ_DECL(pj_status_t) pjsip_endpt_handle_events( pjsip_endpoint *endpt,  
     115                                                const pj_time_val *max_timeout); 
    114116 
    115117 
  • pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c

    r235 r248  
    6666    pj_ioqueue_t        *ioqueue; 
    6767 
     68    /** Last ioqueue err */ 
     69    pj_status_t          ioq_last_err; 
     70 
    6871    /** DNS Resolver. */ 
    6972    pjsip_resolver_t    *resolver; 
     
    590593 * Handle events. 
    591594 */ 
    592 PJ_DEF(void) pjsip_endpt_handle_events( pjsip_endpoint *endpt, 
    593                                         const pj_time_val *max_timeout) 
     595PJ_DEF(pj_status_t) pjsip_endpt_handle_events(pjsip_endpoint *endpt, 
     596                                              const pj_time_val *max_timeout) 
    594597{ 
    595598    /* timeout is 'out' var. This just to make compiler happy. */ 
     
    612615 
    613616    /* Poll ioqueue. */ 
    614     pj_ioqueue_poll( endpt->ioqueue, &timeout); 
     617    if (pj_ioqueue_poll( endpt->ioqueue, &timeout) < 0) { 
     618        pj_thread_sleep(1); 
     619        return pj_get_netos_error(); 
     620    } else { 
     621        return PJ_SUCCESS; 
     622    } 
    615623} 
    616624 
Note: See TracChangeset for help on using the changeset viewer.