- Timestamp:
- Jun 24, 2009 6:52:57 PM (15 years ago)
- Location:
- pjproject/branches/1.0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.0
- Property svn:mergeinfo changed
/pjproject/trunk merged: 2643,2665
- Property svn:mergeinfo changed
-
pjproject/branches/1.0/pjmedia/src/pjmedia/sdp_neg.c
r2394 r2795 423 423 neg->state = PJMEDIA_SDP_NEG_STATE_WAIT_NEGO; 424 424 if (local) { 425 if (!neg->initial_sdp) { 425 neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local); 426 if (neg->initial_sdp) { 427 /* I don't think there is anything in RFC 3264 that mandates 428 * answerer to place the same origin (and increment version) 429 * in the answer, but probably it won't hurt either. 430 * Note that the version will be incremented in 431 * pjmedia_sdp_neg_negotiate() 432 */ 433 neg->neg_local_sdp->origin.id = neg->initial_sdp->origin.id; 434 } else { 426 435 neg->initial_sdp = pjmedia_sdp_session_clone(pool, local); 427 436 } 428 neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local);429 437 } else { 430 438 PJ_ASSERT_RETURN(neg->initial_sdp, PJMEDIA_SDPNEG_ENOINITIAL); -
pjproject/branches/1.0/pjsip/src/pjsip-ua/sip_inv.c
r2394 r2795 2247 2247 } 2248 2248 2249 /* Notify negotiator about the new offer. This will fix the offer 2250 * with correct SDP origin. 2251 */ 2249 2252 status = pjmedia_sdp_neg_modify_local_offer(inv->pool,inv->neg, 2250 2253 offer); … … 2252 2255 goto on_error; 2253 2256 2257 /* Retrieve the "fixed" offer from negotiator */ 2258 pjmedia_sdp_neg_get_neg_local(inv->neg, &offer); 2254 2259 2255 2260 /* Update Contact if required */ … … 3618 3623 (*mod_inv.cb.on_create_offer)(inv, &sdp); 3619 3624 if (sdp) { 3625 /* Notify negotiator about the new offer. This will 3626 * fix the offer with correct SDP origin. 3627 */ 3620 3628 status = pjmedia_sdp_neg_modify_local_offer(dlg->pool, 3621 3629 inv->neg, 3622 3630 sdp); 3631 3632 /* Retrieve the "fixed" offer from negotiator */ 3633 if (status==PJ_SUCCESS) { 3634 const pjmedia_sdp_session *lsdp = NULL; 3635 pjmedia_sdp_neg_get_neg_local(inv->neg, &lsdp); 3636 sdp = (pjmedia_sdp_session*)lsdp; 3637 } 3623 3638 } 3624 3639 } -
pjproject/branches/1.0/pjsip/src/pjsua-lib/pjsua_call.c
r2394 r2795 78 78 static pj_status_t create_sdp_of_call_hold(pjsua_call *call, 79 79 pjmedia_sdp_session **p_answer); 80 81 /* Update SDP version in the offer */82 static void update_sdp_version(pjsua_call *call,83 pjmedia_sdp_session *sdp)84 {85 const pjmedia_sdp_session *old_sdp = NULL;86 pj_status_t status;87 88 status = pjmedia_sdp_neg_get_active_local(call->inv->neg, &old_sdp);89 if (status != PJ_SUCCESS || old_sdp == NULL)90 return;91 92 sdp->origin.version = old_sdp->origin.version + 1;93 }94 95 80 96 81 /* … … 1508 1493 } 1509 1494 1510 update_sdp_version(call, sdp);1511 1512 1495 /* Create re-INVITE with new offer */ 1513 1496 status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata); … … 1580 1563 } 1581 1564 1582 update_sdp_version(call, sdp);1583 1584 1565 /* Create re-INVITE with new offer */ 1585 1566 status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata); … … 1638 1619 return status; 1639 1620 } 1640 1641 update_sdp_version(call, sdp);1642 1621 1643 1622 /* Create UPDATE with new offer */ … … 3310 3289 } 3311 3290 3312 update_sdp_version(call, *offer);3313 3314 3291 PJSUA_UNLOCK(); 3315 3292 }
Note: See TracChangeset
for help on using the changeset viewer.