Changeset 1266 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
- Timestamp:
- May 11, 2007 3:14:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r1242 r1266 38 38 PJ_DEF(pj_bool_t) pjsua_acc_is_valid(pjsua_acc_id acc_id) 39 39 { 40 return acc_id>=0 && acc_id< PJ_ARRAY_SIZE(pjsua_var.acc) &&40 return acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc) && 41 41 pjsua_var.acc[acc_id].valid; 42 42 } … … 186 186 pj_strdup_with_null(pjsua_var.pool, &tmp, 187 187 &pjsua_var.ua_cfg.outbound_proxy[i]); 188 r = pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 188 r = (pjsip_route_hdr*) 189 pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 189 190 if (r == NULL) { 190 191 pjsua_perror(THIS_FILE, "Invalid outbound proxy URI", … … 201 202 202 203 pj_strdup_with_null(pjsua_var.pool, &tmp, &acc_cfg->proxy[i]); 203 r = pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 204 r = (pjsip_route_hdr*) 205 pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 204 206 if (r == NULL) { 205 207 pjsua_perror(THIS_FILE, "Invalid URI in account route set", … … 323 325 324 326 /* ID must be valid */ 325 PJ_ASSERT_RETURN(tid>=0 && tid<PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL); 327 PJ_ASSERT_RETURN(tid>=0 && tid<(int)PJ_ARRAY_SIZE(pjsua_var.tpdata), 328 PJ_EINVAL); 326 329 327 330 /* Transport must be valid */ … … 434 437 { 435 438 436 pjsua_acc *acc = param->token;439 pjsua_acc *acc = (pjsua_acc*) param->token; 437 440 438 441 PJSUA_LOCK(); … … 817 820 } 818 821 819 sip_uri = pjsip_uri_get_uri(uri);822 sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(uri); 820 823 821 824 /* Find matching domain AND port */ … … 955 958 r = acc->route_set.next; 956 959 while (r != &acc->route_set) { 957 pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool, r)); 960 pjsip_msg_add_hdr(tdata->msg, 961 (pjsip_hdr*)pjsip_hdr_clone(tdata->pool, r)); 958 962 r = r->next; 959 963 } … … 1037 1041 1038 1042 /* Create the contact header */ 1039 contact->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);1043 contact->ptr = (char*)pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 1040 1044 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE, 1041 1045 "%.*s%s<%s:%.*s%s%.*s:%d;transport=%s>", … … 1098 1102 1099 1103 /* Otherwise URI is Contact URI */ 1100 h_contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1104 h_contact = (pjsip_contact_hdr*) 1105 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1101 1106 NULL); 1102 1107 if (h_contact) 1103 uri = pjsip_uri_get_uri(h_contact->uri);1108 uri = (pjsip_uri*) pjsip_uri_get_uri(h_contact->uri); 1104 1109 1105 1110 … … 1108 1113 */ 1109 1114 if (uri == NULL) 1110 uri = pjsip_uri_get_uri(rdata->msg_info.from->uri);1115 uri = (pjsip_uri*) pjsip_uri_get_uri(rdata->msg_info.from->uri); 1111 1116 1112 1117 … … 1143 1148 1144 1149 /* Create the contact header */ 1145 contact->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);1150 contact->ptr = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 1146 1151 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE, 1147 1152 "%.*s%s<%s:%.*s%s%.*s:%d;transport=%s>", … … 1170 1175 acc = &pjsua_var.acc[acc_id]; 1171 1176 1172 PJ_ASSERT_RETURN(tp_id >= 0 && tp_id < PJ_ARRAY_SIZE(pjsua_var.tpdata),1177 PJ_ASSERT_RETURN(tp_id >= 0 && tp_id < (int)PJ_ARRAY_SIZE(pjsua_var.tpdata), 1173 1178 PJ_EINVAL); 1174 1179
Note: See TracChangeset
for help on using the changeset viewer.