diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-04-14 04:04:30 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-04-14 04:04:30 +0000 |
commit | e91435553f8ef0d86f5ac01c298071dd3ea28bb2 (patch) | |
tree | 0bd8ce3290a9879f2362356e794e0f841672223f /pjsip/src/pjsua-lib/pjsua_acc.c | |
parent | a16dbe29358fbe42ded721c9de52ddfae42d2c92 (diff) |
Fixed miscellaneous compile warnings/errors when built with C++ mode
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1929 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_acc.c')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 2258cdd9..77d8d2b3 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -519,8 +519,11 @@ static pj_bool_t acc_check_nat_addr(pjsua_acc *acc, if (via->rport_param < 1) { /* Remote doesn't support rport */ rport = via->sent_by.port; - if (rport==0) - rport = pjsip_transport_get_default_port_for_type(tp->key.type); + if (rport==0) { + pjsip_transport_type_e tp_type; + tp_type = (pjsip_transport_type_e) tp->key.type; + rport = pjsip_transport_get_default_port_for_type(tp_type); + } } else rport = via->rport_param; @@ -534,10 +537,13 @@ static pj_bool_t acc_check_nat_addr(pjsua_acc *acc, uri = (pjsip_sip_uri*) pjsip_parse_uri(pool, acc->contact.ptr, acc->contact.slen, 0); pj_assert(uri != NULL); - uri = pjsip_uri_get_uri(uri); + uri = (pjsip_sip_uri*) pjsip_uri_get_uri(uri); - if (uri->port == 0) - uri->port = pjsip_transport_get_default_port_for_type(tp->key.type); + if (uri->port == 0) { + pjsip_transport_type_e tp_type; + tp_type = (pjsip_transport_type_e) tp->key.type; + uri->port = pjsip_transport_get_default_port_for_type(tp_type); + } if (uri->port == rport && pj_stricmp(&uri->host, via_addr)==0) @@ -572,7 +578,7 @@ static pj_bool_t acc_check_nat_addr(pjsua_acc *acc, char *tmp; int len; - tmp = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); + tmp = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE, "<sip:%.*s@%.*s:%d;transport=%s>", (int)acc->user_part.slen, |