Changeset 2226

Show
Ignore:
Timestamp:
08/19/08 18:18:02 (11 months ago)
Author:
bennylp
Message:

pjsip_endpt_handle_events2() is loosing the error code in MacOS X if pj_ioqueue_poll() returns error. This is because pj_thread_sleep() always set errno to ETIMEDOUT on MacOS X (thanks Ruud Klaver for the report)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c

    r2127 r2226  
    718718        c = pj_ioqueue_poll( endpt->ioqueue, &timeout); 
    719719        if (c < 0) { 
     720            pj_status_t err = pj_get_netos_error(); 
    720721            pj_thread_sleep(PJ_TIME_VAL_MSEC(timeout)); 
    721722            if (p_count) 
    722723                *p_count = count; 
    723             return pj_get_netos_error()
     724            return err
    724725        } else if (c == 0) { 
    725726            break;