diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-08-19 16:18:02 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-08-19 16:18:02 +0000 |
commit | a40058e9026bc9228f23711ad15bdb4ee55bc991 (patch) | |
tree | 59ec219e8cabdb5e4216ae0615df5041923b60e1 /pjsip | |
parent | 7bca826692c3b029ad1fde8f6e842372381e34ae (diff) |
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)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2226 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsip/sip_endpoint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pjsip/src/pjsip/sip_endpoint.c b/pjsip/src/pjsip/sip_endpoint.c index 8d2f2edb..b3caf3fc 100644 --- a/pjsip/src/pjsip/sip_endpoint.c +++ b/pjsip/src/pjsip/sip_endpoint.c @@ -717,10 +717,11 @@ PJ_DEF(pj_status_t) pjsip_endpt_handle_events2(pjsip_endpoint *endpt, do { c = pj_ioqueue_poll( endpt->ioqueue, &timeout); if (c < 0) { + pj_status_t err = pj_get_netos_error(); pj_thread_sleep(PJ_TIME_VAL_MSEC(timeout)); if (p_count) *p_count = count; - return pj_get_netos_error(); + return err; } else if (c == 0) { break; } else { |