diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2009-03-02 15:48:45 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2009-03-02 15:48:45 +0000 |
commit | c205201320f80d9e25e554566da5b7f11203f871 (patch) | |
tree | 9c36ccb99099beae87670633c72e63358c95df80 /pjsip/src | |
parent | 33e9dc9f2613a86b0fcfea7d669d1b83934d45fd (diff) |
Ticket #732:
- Added new Symbian specific API in PJLIB, pj_symbianos_set_connection_status(), to let PJLIB knows the connection status.
- Added connection status checks before Symbian socket operations.
- Added loop limiter in Symbian busy_sleep() to avoid the possibility of infinite loop.
- Added sample of connection monitor in Symbian sample application (ua.cpp).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2481 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index b59fe26e..4b7c4baa 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -835,8 +835,10 @@ static void busy_sleep(unsigned msec) pj_time_val_normalize(&timeout); do { - while (pjsua_handle_events(10) > 0) - ; + int i; + i = msec / 10; + while (pjsua_handle_events(10) > 0 && i > 0) + --i; pj_gettimeofday(&now); } while (PJ_TIME_VAL_LT(now, timeout)); } |