- Timestamp:
- Apr 23, 2009 11:50:25 AM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/sdp_neg.c
r2394 r2643 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/trunk/pjsip/src/pjsip-ua/sip_inv.c
r2594 r2643 2249 2249 } 2250 2250 2251 /* Notify negotiator about the new offer. This will fix the offer 2252 * with correct SDP origin. 2253 */ 2251 2254 status = pjmedia_sdp_neg_modify_local_offer(inv->pool,inv->neg, 2252 2255 offer); … … 2254 2257 goto on_error; 2255 2258 2259 /* Retrieve the "fixed" offer from negotiator */ 2260 pjmedia_sdp_neg_get_neg_local(inv->neg, &offer); 2256 2261 2257 2262 /* Update Contact if required */ … … 3620 3625 (*mod_inv.cb.on_create_offer)(inv, &sdp); 3621 3626 if (sdp) { 3627 /* Notify negotiator about the new offer. This will 3628 * fix the offer with correct SDP origin. 3629 */ 3622 3630 status = pjmedia_sdp_neg_modify_local_offer(dlg->pool, 3623 3631 inv->neg, 3624 3632 sdp); 3633 3634 /* Retrieve the "fixed" offer from negotiator */ 3635 if (status==PJ_SUCCESS) 3636 pjmedia_sdp_neg_get_neg_local(inv->neg, &sdp); 3625 3637 } 3626 3638 } -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r2593 r2643 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 /* … … 1520 1505 } 1521 1506 1522 update_sdp_version(call, sdp);1523 1524 1507 /* Create re-INVITE with new offer */ 1525 1508 status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata); … … 1592 1575 } 1593 1576 1594 update_sdp_version(call, sdp);1595 1596 1577 /* Create re-INVITE with new offer */ 1597 1578 status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata); … … 1650 1631 return status; 1651 1632 } 1652 1653 update_sdp_version(call, sdp);1654 1633 1655 1634 /* Create UPDATE with new offer */ … … 3322 3301 } 3323 3302 3324 update_sdp_version(call, *offer);3325 3326 3303 PJSUA_UNLOCK(); 3327 3304 }
Note: See TracChangeset
for help on using the changeset viewer.