Changeset 2130 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Jul 13, 2008 12:24:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r2079 r2130 331 331 pjsua_call_id *p_call_id) 332 332 { 333 pj_pool_t *tmp_pool; 333 334 pjsip_dialog *dlg = NULL; 334 335 pjmedia_sdp_session *offer; … … 383 384 call = &pjsua_var.calls[call_id]; 384 385 386 /* Create temporary pool */ 387 tmp_pool = pjsua_pool_create("tmpcall10", 512, 256); 388 385 389 /* Verify that destination URI is valid before calling 386 390 * pjsua_acc_create_uac_contact, or otherwise there … … 389 393 */ 390 394 if (1) { 391 pj_pool_t *pool;392 395 pjsip_uri *uri; 393 396 pj_str_t dup; 394 397 395 pool = pjsua_pool_create("tmp-uri", 4000, 4000); 396 if (!pool) { 397 pjsua_perror(THIS_FILE, "Unable to create pool", PJ_ENOMEM); 398 PJSUA_UNLOCK(); 399 return PJ_ENOMEM; 400 } 401 402 pj_strdup_with_null(pool, &dup, dest_uri); 403 uri = pjsip_parse_uri(pool, dup.ptr, dup.slen, 0); 404 pj_pool_release(pool); 398 pj_strdup_with_null(tmp_pool, &dup, dest_uri); 399 uri = pjsip_parse_uri(tmp_pool, dup.ptr, dup.slen, 0); 405 400 406 401 if (uri == NULL) { 407 402 pjsua_perror(THIS_FILE, "Unable to make call", 408 403 PJSIP_EINVALIDREQURI); 404 pj_pool_release(tmp_pool); 409 405 PJSUA_UNLOCK(); 410 406 return PJSIP_EINVALIDREQURI; … … 427 423 contact = acc->contact; 428 424 } else { 429 status = pjsua_acc_create_uac_contact( pjsua_var.pool, &contact,425 status = pjsua_acc_create_uac_contact(tmp_pool, &contact, 430 426 acc_id, dest_uri); 431 427 if (status != PJ_SUCCESS) { 432 428 pjsua_perror(THIS_FILE, "Unable to generate Contact header", 433 429 status); 430 pj_pool_release(tmp_pool); 434 431 PJSUA_UNLOCK(); 435 432 return status; … … 443 440 if (status != PJ_SUCCESS) { 444 441 pjsua_perror(THIS_FILE, "Dialog creation failed", status); 442 pj_pool_release(tmp_pool); 445 443 PJSUA_UNLOCK(); 446 444 return status; … … 550 548 *p_call_id = call_id; 551 549 550 pj_pool_release(tmp_pool); 552 551 PJSUA_UNLOCK(); 553 552 … … 567 566 } 568 567 568 pj_pool_release(tmp_pool); 569 569 PJSUA_UNLOCK(); 570 570 return status; … … 2618 2618 { 2619 2619 pj_status_t status; 2620 pj_pool_t *pool; 2620 2621 pjmedia_sdp_conn *conn; 2621 2622 pjmedia_sdp_attr *attr; … … 2623 2624 pjmedia_sdp_session *sdp; 2624 2625 2626 /* Use call's pool */ 2627 pool = call->inv->pool; 2628 2625 2629 /* Get media socket info */ 2626 2630 pjmedia_transport_info_init(&tp_info); … … 2628 2632 2629 2633 /* Create new offer */ 2630 status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, p jsua_var.pool, 1,2634 status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, pool, 1, 2631 2635 &tp_info.sock_info, &sdp); 2632 2636 if (status != PJ_SUCCESS) { … … 2650 2654 2651 2655 /* Add inactive attribute */ 2652 attr = pjmedia_sdp_attr_create(p jsua_var.pool, "inactive", NULL);2656 attr = pjmedia_sdp_attr_create(pool, "inactive", NULL); 2653 2657 pjmedia_sdp_media_add_attr(sdp->media[0], attr); 2654 2658
Note: See TracChangeset
for help on using the changeset viewer.