Changeset 1537


Ignore:
Timestamp:
Oct 31, 2007 3:52:09 PM (17 years ago)
Author:
bennylp
Message:

Ticket #408: Route set shouldn't be updated once it has been set (thanks Anshuman S. Rawat)

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_dialog.h

    r1461 r1537  
    131131    pjsip_cid_hdr      *call_id;    /**< Call-ID header.                    */ 
    132132    pjsip_route_hdr     route_set;  /**< Route set.                         */ 
     133    pj_bool_t           route_set_frozen; /**< Route set has been set.      */ 
    133134    pjsip_auth_clt_sess auth_sess;  /**< Client authentication session.     */ 
    134135 
  • pjproject/trunk/pjsip/src/pjsip/sip_dialog.c

    r1469 r1537  
    473473                                                   PJSIP_H_RECORD_ROUTE, rr); 
    474474    } 
     475    dlg->route_set_frozen = PJ_TRUE; 
    475476 
    476477    /* Init client authentication session. */ 
     
    642643        r = r->next; 
    643644    } 
     645    dlg->route_set_frozen = PJ_TRUE; 
    644646 
    645647    /* Clone client authentication session. */ 
     
    15411543    const pjsip_hdr *hdr, *end_hdr; 
    15421544 
     1545    /* Ignore if route set has been set */ 
     1546    if (dlg->route_set_frozen) 
     1547        return; 
     1548 
    15431549    pj_list_init(&dlg->route_set); 
    15441550 
     
    15521558        } 
    15531559    } 
     1560    dlg->route_set_frozen = PJ_TRUE; 
    15541561} 
    15551562 
     
    15601567{ 
    15611568    unsigned i; 
    1562     pj_bool_t routeset_updated = PJ_FALSE; 
    15631569    int res_code; 
    15641570 
     
    16141620         */ 
    16151621        dlg_update_routeset(dlg, rdata->msg_info.msg); 
    1616         routeset_updated = PJ_TRUE; 
    16171622 
    16181623        /* The remote target MUST be set to the URI from the Contact header  
     
    16741679        } 
    16751680 
    1676         if (!routeset_updated) { 
    1677             dlg_update_routeset(dlg, rdata->msg_info.msg); 
    1678             routeset_updated = PJ_TRUE; 
    1679         } 
     1681        dlg_update_routeset(dlg, rdata->msg_info.msg); 
    16801682    } 
    16811683 
Note: See TracChangeset for help on using the changeset viewer.