Changeset 1549


Ignore:
Timestamp:
Nov 5, 2007 5:54:25 AM (16 years ago)
Author:
bennylp
Message:

Increment SDP version upon creating subsequent offer inside the call (ref: Sipit21/Mon/12:30)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r1538 r1549  
    7272                                       pjmedia_sdp_session **p_answer); 
    7373 
     74/* Update SDP version in the offer */ 
     75static void update_sdp_version(pjsua_call *call, 
     76                               pjmedia_sdp_session *sdp) 
     77{ 
     78    const pjmedia_sdp_session *old_sdp = NULL; 
     79    pj_status_t status; 
     80 
     81    status = pjmedia_sdp_neg_get_active_local(call->inv->neg, &old_sdp); 
     82    if (status != PJ_SUCCESS || old_sdp == NULL) 
     83        return; 
     84 
     85    sdp->origin.version = old_sdp->origin.version + 1; 
     86} 
     87 
     88 
    7489/* 
    7590 * Callback called by event framework when the xfer subscription state 
     
    12231238    } 
    12241239 
     1240    update_sdp_version(call, sdp); 
     1241 
    12251242    /* Create re-INVITE with new offer */ 
    12261243    status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata); 
     
    12931310        return status; 
    12941311    } 
     1312 
     1313    update_sdp_version(call, sdp); 
    12951314 
    12961315    /* Create re-INVITE with new offer */ 
     
    25072526    } 
    25082527 
     2528    update_sdp_version(call, *offer); 
    25092529 
    25102530    PJSUA_UNLOCK(); 
Note: See TracChangeset for help on using the changeset viewer.