Changeset 2871
- Timestamp:
- Aug 12, 2009 10:28:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r2864 r2871 349 349 } 350 350 351 /* Get media socket info */ 352 pjmedia_transport_info_init(&tpinfo); 353 pjmedia_transport_get_info(pjsua_var.calls[0].med_tp, &tpinfo); 354 355 /* Add SDP body, using call0's RTP address */ 356 status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, tdata->pool, 1, 357 &tpinfo.sock_info, &sdp); 358 if (status == PJ_SUCCESS) { 359 pjsip_create_sdp_body(tdata->pool, sdp, &tdata->msg->body); 351 /* Get media socket info, make sure transport is ready */ 352 if (pjsua_var.calls[0].med_tp) { 353 pjmedia_transport_info_init(&tpinfo); 354 pjmedia_transport_get_info(pjsua_var.calls[0].med_tp, &tpinfo); 355 356 /* Add SDP body, using call0's RTP address */ 357 status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, tdata->pool, 1, 358 &tpinfo.sock_info, &sdp); 359 if (status == PJ_SUCCESS) { 360 pjsip_create_sdp_body(tdata->pool, sdp, &tdata->msg->body); 361 } 360 362 } 361 363 … … 1249 1251 } 1250 1252 1251 /* Destroy media */1252 pjsua_media_subsys_destroy();1253 1254 1253 /* Destroy endpoint. */ 1255 1254 if (pjsua_var.endpt) { … … 1273 1272 PJ_LOG(4,(THIS_FILE, "Destroying...")); 1274 1273 1274 /* Terminate all calls again, just in case there's new call 1275 * picked up during busy_sleep() 1276 */ 1277 pjsua_call_hangup_all(); 1278 1279 /* Destroy media after all polling is done, as there may be 1280 * incoming request that needs handling (e.g. OPTIONS) 1281 */ 1282 pjsua_media_subsys_destroy(); 1283 1275 1284 /* Must destroy endpoint first before destroying pools in 1276 1285 * buddies or accounts, since shutting down transaction layer … … 1296 1305 } 1297 1306 } 1307 } else { 1308 /* Destroy media */ 1309 pjsua_media_subsys_destroy(); 1298 1310 } 1299 1311
Note: See TracChangeset
for help on using the changeset viewer.