summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiza Sulistyo <riza@teluu.com>2015-04-07 02:24:47 +0000
committerRiza Sulistyo <riza@teluu.com>2015-04-07 02:24:47 +0000
commit294449e59b44d5cb7cae6fd5c9c4a35d9d277080 (patch)
tree0d59495c2e508266e43929d82881f60b8f9d6797
parentac0421f0a215fa9533a72fde494f3fca4d48cd2f (diff)
Misc (re #1782): Fixed SIP error code not set properly when there's an error in initializing media channel. Thanks to Roman Kublin for the report.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5048 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index 72553b47..9f6a065b 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -1224,8 +1224,10 @@ static pj_status_t call_media_init_cb(pjsua_call_media *call_med,
pjmedia_transport_info tpinfo;
int err_code = 0;
- if (status != PJ_SUCCESS)
+ if (status != PJ_SUCCESS) {
+ err_code = PJSIP_SC_TEMPORARILY_UNAVAILABLE;
goto on_return;
+ }
pjmedia_transport_simulate_lost(call_med->tp, PJMEDIA_DIR_ENCODING,
pjsua_var.media_cfg.tx_drop_pct);