Changeset 939


Ignore:
Timestamp:
Feb 10, 2007 7:22:25 PM (12 years ago)
Author:
bennylp
Message:

Related to ticket #97: make name_addr handling more robust against possibility of bugs that someone may put another name_addr inside a name_addr

Location:
pjproject/trunk/pjsip/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_uri.c

    r611 r939  
    204204static void *pjsip_name_addr_get_uri( pjsip_name_addr *name ) 
    205205{ 
    206     return name->uri; 
     206    return pjsip_uri_get_uri(name->uri); 
    207207} 
    208208 
     
    530530    char *startbuf = buf; 
    531531    char *endbuf = buf + size; 
    532  
    533     pj_assert(name->uri != NULL); 
     532    pjsip_uri *uri; 
     533 
     534    uri = pjsip_uri_get_uri(name->uri); 
     535    pj_assert(uri != NULL); 
    534536 
    535537    if (context != PJSIP_URI_IN_REQ_URI) { 
     
    544546    } 
    545547 
    546     printed = pjsip_uri_print(context,name->uri, buf, size-(buf-startbuf)); 
     548    printed = pjsip_uri_print(context,uri, buf, size-(buf-startbuf)); 
    547549    if (printed < 1) 
    548550        return -1; 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r892 r939  
    944944     */ 
    945945    if (!pj_list_empty(&acc->route_set)) { 
    946         sip_uri = (pjsip_sip_uri*) acc->route_set.next->name_addr.uri; 
     946        sip_uri = (pjsip_sip_uri*)  
     947                  pjsip_uri_get_uri(acc->route_set.next->name_addr.uri); 
    947948    } else { 
    948949        pj_str_t tmp; 
     
    10351036    /* If Record-Route is present, then URI is the top Record-Route. */ 
    10361037    if (rdata->msg_info.record_route) { 
    1037         sip_uri = (pjsip_sip_uri*) rdata->msg_info.record_route->name_addr.uri; 
     1038        sip_uri = (pjsip_sip_uri*)  
     1039                pjsip_uri_get_uri(rdata->msg_info.record_route->name_addr.uri); 
    10381040    } else { 
    10391041        pjsip_contact_hdr *h_contact; 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c

    r892 r939  
    186186    pjsua_var.buddy[index].uri = tmp; 
    187187 
    188     sip_uri = (pjsip_sip_uri*) url->uri; 
     188    sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(url->uri); 
    189189    pjsua_var.buddy[index].name = sip_uri->user; 
    190190    pjsua_var.buddy[index].display = url->display; 
Note: See TracChangeset for help on using the changeset viewer.