Changeset 3503
- Timestamp:
- Apr 7, 2011 5:14:26 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/sdp_neg.c
r3500 r3503 262 262 } 263 263 264 static pjmedia_sdp_media *sdp_media_clone_deactivate( 265 pj_pool_t *pool, 266 const pjmedia_sdp_media *rem_med, 267 const pjmedia_sdp_media *local_med, 268 const pjmedia_sdp_session *local_sess) 269 { 270 pjmedia_sdp_media *res; 271 272 res = pjmedia_sdp_media_clone_deactivate(pool, rem_med); 273 if (!res) 274 return NULL; 275 276 if (!res->conn && (!local_sess || !local_sess->conn)) { 277 if (local_med && local_med->conn) 278 res->conn = pjmedia_sdp_conn_clone(pool, local_med->conn); 279 else { 280 res->conn = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_conn); 281 res->conn->net_type = pj_str("IN"); 282 res->conn->addr_type = pj_str("IP4"); 283 res->conn->addr = pj_str("127.0.0.1"); 284 } 285 } 286 287 return res; 288 } 264 289 265 290 /* … … 342 367 pjmedia_sdp_media *m; 343 368 344 m = pjmedia_sdp_media_clone_deactivate(pool, om);369 m = sdp_media_clone_deactivate(pool, om, om, local); 345 370 346 371 pj_array_insert(new_offer->media, sizeof(new_offer->media[0]), … … 1055 1080 1056 1081 /* Generate matching-but-disabled-media for the answer */ 1057 am = pjmedia_sdp_media_clone_deactivate(pool, offer->media[omi]); 1082 am = sdp_media_clone_deactivate(pool, offer->media[omi], 1083 offer->media[omi], offer); 1058 1084 answer->media[answer->media_count++] = am; 1059 1085 ++ami; … … 1117 1143 /* If offer has zero port, just clone the offer */ 1118 1144 if (offer->desc.port == 0) { 1119 answer = pjmedia_sdp_media_clone_deactivate(pool, offer);1145 answer = sdp_media_clone_deactivate(pool, offer, preanswer, NULL); 1120 1146 *p_answer = answer; 1121 1147 return PJ_SUCCESS; … … 1430 1456 * number is zero. 1431 1457 */ 1432 am = pjmedia_sdp_media_clone_deactivate(pool, om);1458 am = sdp_media_clone_deactivate(pool, om, om, answer); 1433 1459 } else { 1434 1460 /* The answer is in am */
Note: See TracChangeset
for help on using the changeset viewer.