Ignore:
Timestamp:
Apr 14, 2008 4:04:30 AM (16 years ago)
Author:
bennylp
Message:

Fixed miscellaneous compile warnings/errors when built with C++ mode

File:
1 edited

Legend:

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

    r1908 r1929  
    520520        /* Remote doesn't support rport */ 
    521521        rport = via->sent_by.port; 
    522         if (rport==0) 
    523             rport = pjsip_transport_get_default_port_for_type(tp->key.type); 
     522        if (rport==0) { 
     523            pjsip_transport_type_e tp_type; 
     524            tp_type = (pjsip_transport_type_e) tp->key.type; 
     525            rport = pjsip_transport_get_default_port_for_type(tp_type); 
     526        } 
    524527    } else 
    525528        rport = via->rport_param; 
     
    535538          pjsip_parse_uri(pool, acc->contact.ptr, acc->contact.slen, 0); 
    536539    pj_assert(uri != NULL); 
    537     uri = pjsip_uri_get_uri(uri); 
    538  
    539     if (uri->port == 0) 
    540         uri->port = pjsip_transport_get_default_port_for_type(tp->key.type); 
     540    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(uri); 
     541 
     542    if (uri->port == 0) { 
     543        pjsip_transport_type_e tp_type; 
     544        tp_type = (pjsip_transport_type_e) tp->key.type; 
     545        uri->port = pjsip_transport_get_default_port_for_type(tp_type); 
     546    } 
    541547 
    542548    if (uri->port == rport && 
     
    573579        int len; 
    574580 
    575         tmp = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 
     581        tmp = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 
    576582        len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE, 
    577583                               "<sip:%.*s@%.*s:%d;transport=%s>", 
Note: See TracChangeset for help on using the changeset viewer.