Changeset 3508
- Timestamp:
- Apr 7, 2011 2:51:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_call.c
r3506 r3508 3851 3851 { 3852 3852 pjsua_call *call; 3853 pjmedia_sdp_conn *conn = NULL;3854 3853 pjmedia_sdp_session *answer; 3854 unsigned i; 3855 3855 pj_status_t status; 3856 3856 … … 3858 3858 3859 3859 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 3860 3861 if (call->audio_idx < (int)offer->media_count)3862 conn = offer->media[call->audio_idx]->conn;3863 3864 if (!conn)3865 conn = offer->conn;3866 3860 3867 3861 /* Supply candidate answer */ … … 3878 3872 } 3879 3873 3874 /* Validate media count in the generated answer */ 3875 pj_assert(answer->media_count == offer->media_count); 3876 3880 3877 /* Check if offer's conn address is zero */ 3881 if (pj_strcmp2(&conn->addr, "0.0.0.0")==0 || 3882 pj_strcmp2(&conn->addr, "0")==0) 3883 { 3884 /* Modify address */ 3885 answer->conn->addr = pj_str("0.0.0.0"); 3878 for (i = 0; i < answer->media_count; ++i) { 3879 pjmedia_sdp_conn *conn; 3880 3881 conn = offer->media[i]->conn; 3882 if (!conn) 3883 conn = offer->conn; 3884 3885 if (pj_strcmp2(&conn->addr, "0.0.0.0")==0 || 3886 pj_strcmp2(&conn->addr, "0")==0) 3887 { 3888 pjmedia_sdp_conn *a_conn = answer->media[i]->conn; 3889 3890 /* Modify answer address */ 3891 if (a_conn) { 3892 a_conn->addr = pj_str("0.0.0.0"); 3893 } else if (answer->conn == NULL || 3894 pj_strcmp2(&answer->conn->addr, "0.0.0.0") != 0) 3895 { 3896 a_conn = PJ_POOL_ZALLOC_T(call->inv->pool_prov, 3897 pjmedia_sdp_conn); 3898 a_conn->net_type = pj_str("IN"); 3899 a_conn->addr_type = pj_str("IP4"); 3900 a_conn->addr = pj_str("0.0.0.0"); 3901 answer->media[i]->conn = a_conn; 3902 } 3903 } 3886 3904 } 3887 3905
Note: See TracChangeset
for help on using the changeset viewer.