summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_call.c
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2011-05-20 10:29:45 +0000
committerNanang Izzuddin <nanang@teluu.com>2011-05-20 10:29:45 +0000
commit6d9136ebc170264062f57ff5eb064e2e775be7b8 (patch)
tree52ec99934871b2da27a3e5e9c55dab22d8d236a1 /pjsip/src/pjsua-lib/pjsua_call.c
parentb3b5ef9fdc2de0cd513f5b9da218a0b6bba469da (diff)
Fixed #1291:
- fixed bug in SIP invite module, SDP negotiator state should be reverted back after an SDP re-offer is rejected by application. - fixed bug in pjsua_call_on_rx_offer(), evaluating call->audio_index should be done after pjsua_media_channel_create_sdp() is successful. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3574 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_call.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index b58fd758..646f60a1 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -3778,12 +3778,6 @@ static void pjsua_call_on_rx_offer(pjsip_inv_session *inv,
call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id];
- if (call->audio_idx < (int)offer->media_count)
- conn = offer->media[call->audio_idx]->conn;
-
- if (!conn)
- conn = offer->conn;
-
/* Supply candidate answer */
PJ_LOG(4,(THIS_FILE, "Call %d: received updated media offer",
call->index));
@@ -3797,6 +3791,12 @@ static void pjsua_call_on_rx_offer(pjsip_inv_session *inv,
return;
}
+ if (call->audio_idx >= 0 && call->audio_idx < (int)offer->media_count)
+ conn = offer->media[call->audio_idx]->conn;
+
+ if (!conn)
+ conn = offer->conn;
+
/* Check if offer's conn address is zero */
if (pj_strcmp2(&conn->addr, "0.0.0.0")==0 ||
pj_strcmp2(&conn->addr, "0")==0)