diff options
author | Benny Prijono <bennylp@teluu.com> | 2010-06-19 12:35:33 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2010-06-19 12:35:33 +0000 |
commit | 8d35b8f739dbad39422332ecb8376cc18a858f2e (patch) | |
tree | 622f42846ed18a5eb31b861693a922f51dd4e008 /pjsip/src/pjsua-lib/pjsua_media.c | |
parent | f762fd7b4817c6668da0859b188d9d21a21e38bf (diff) |
Fixed #1077: In ICE stream transport (ice_strans.c), automaticaly retry allocation once if TURN allocation fails. If this allocation retry also fails, notify the TURN user via on_ice_complete() callback. Details:
- added new PJ_ICE_STRANS_OP_KEEP_ALIVE operation
- also added new on_ice_transport_error() pjsua callback to allow application to react to the failure.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3212 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_media.c')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index 311c015c..84012080 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -862,6 +862,16 @@ static void on_ice_complete(pjmedia_transport *tp, } } break; + case PJ_ICE_STRANS_OP_KEEP_ALIVE: + if (result != PJ_SUCCESS) { + PJ_PERROR(4,(THIS_FILE, result, + "ICE keep alive failure for transport %d", id)); + } + if (pjsua_var.ua_cfg.cb.on_ice_transport_error) { + (*pjsua_var.ua_cfg.cb.on_ice_transport_error)(id, op, result, + NULL); + } + break; } } |