Changeset 1240 for pjproject/trunk
- Timestamp:
- May 1, 2007 4:54:54 PM (18 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/config_site_sample.h
r1235 r1240 27 27 #endif 28 28 29 /* 30 * Typical configuration for Symbian OS target 31 */ 32 #if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 33 # define PJMEDIA_SOUND_IMPLEMENTATION PJMEDIA_SOUND_NULL_SOUND 34 #endif 29 35 30 36 -
pjproject/trunk/pjmedia/src/pjmedia/sdp.c
r1210 r1240 104 104 PJ_ASSERT_RETURN(pool && name, NULL); 105 105 106 attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));106 attr = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_attr); 107 107 pj_strdup2(pool, &attr->name, name); 108 108 … … 124 124 PJ_ASSERT_RETURN(pool && rhs, NULL); 125 125 126 attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));126 attr = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_attr); 127 127 128 128 pj_strdup(pool, &attr->name, &rhs->name); … … 308 308 status = PJ_SUCCESS; 309 309 } 310 PJ_CATCH (SYNTAX_ERROR){310 PJ_CATCH_ANY { 311 311 status = PJMEDIA_SDP_EINRTPMAP; 312 312 } … … 403 403 404 404 } 405 PJ_CATCH (SYNTAX_ERROR){405 PJ_CATCH_ANY { 406 406 status = PJMEDIA_SDP_EINRTCP; 407 407 } … … 420 420 PJ_ASSERT_RETURN(pool && attr && p_rtpmap, PJ_EINVAL); 421 421 422 *p_rtpmap = pj_pool_alloc(pool, sizeof(pjmedia_sdp_rtpmap));422 *p_rtpmap = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_rtpmap); 423 423 PJ_ASSERT_RETURN(*p_rtpmap, PJ_ENOMEM); 424 424 … … 443 443 444 444 445 attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));445 attr = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_attr); 446 446 PJ_ASSERT_RETURN(attr != NULL, PJ_ENOMEM); 447 447 … … 465 465 466 466 attr->value.slen = len; 467 attr->value.ptr = pj_pool_alloc(pool, attr->value.slen);467 attr->value.ptr = (char*) pj_pool_alloc(pool, attr->value.slen); 468 468 pj_memcpy(attr->value.ptr, tempbuf, attr->value.slen); 469 469 … … 494 494 const pjmedia_sdp_conn *rhs) 495 495 { 496 pjmedia_sdp_conn *c = pj_pool_alloc (pool, sizeof(pjmedia_sdp_conn));496 pjmedia_sdp_conn *c = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_conn); 497 497 if (!c) return NULL; 498 498 … … 589 589 { 590 590 unsigned int i; 591 pjmedia_sdp_media *m = pj_pool_alloc (pool, sizeof(pjmedia_sdp_media));591 pjmedia_sdp_media *m = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_media); 592 592 PJ_ASSERT_RETURN(m != NULL, NULL); 593 593 … … 968 968 ctx->last_error = PJMEDIA_SDP_EINATTR; 969 969 970 attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));970 attr = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_attr); 971 971 972 972 /* check equal sign */ … … 1016 1016 pjmedia_sdp_session *session; 1017 1017 pjmedia_sdp_media *media = NULL; 1018 void*attr;1018 pjmedia_sdp_attr *attr; 1019 1019 pjmedia_sdp_conn *conn; 1020 1020 pj_str_t dummy; … … 1028 1028 1029 1029 pj_scan_init(&scanner, buf, len, 0, &on_scanner_error); 1030 session = pj_pool_calloc(pool, 1, sizeof(pjmedia_sdp_session));1030 session = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_session); 1031 1031 PJ_ASSERT_RETURN(session != NULL, PJ_ENOMEM); 1032 1032 … … 1052 1052 break; 1053 1053 case 'c': 1054 conn = pj_pool_calloc(pool, 1, sizeof(*conn));1054 conn = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_conn); 1055 1055 parse_connection_info(&scanner, conn, &ctx); 1056 1056 if (media) { … … 1064 1064 break; 1065 1065 case 'm': 1066 media = pj_pool_calloc(pool, 1, sizeof(*media));1066 media = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_media); 1067 1067 parse_media(&scanner, media, &ctx); 1068 1068 session->media[ session->media_count++ ] = media; … … 1095 1095 1096 1096 } 1097 PJ_CATCH (SYNTAX_ERROR){1097 PJ_CATCH_ANY { 1098 1098 1099 1099 char errmsg[PJ_ERR_MSG_SIZE]; … … 1138 1138 PJ_ASSERT_RETURN(pool && rhs, NULL); 1139 1139 1140 sess = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_session));1140 sess = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_session); 1141 1141 PJ_ASSERT_RETURN(sess != NULL, NULL); 1142 1142 -
pjproject/trunk/pjmedia/src/pjmedia/sdp_neg.c
r1072 r1240 84 84 85 85 /* Create and initialize negotiator. */ 86 neg = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_neg));86 neg = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_neg); 87 87 PJ_ASSERT_RETURN(neg != NULL, PJ_ENOMEM); 88 88 … … 119 119 120 120 /* Create and initialize negotiator. */ 121 neg = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_neg));121 neg = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_neg); 122 122 PJ_ASSERT_RETURN(neg != NULL, PJ_ENOMEM); 123 123 … … 564 564 */ 565 565 const pjmedia_sdp_attr *a; 566 pjmedia_sdp_rtpmap or ;566 pjmedia_sdp_rtpmap or_; 567 567 568 568 /* Get the rtpmap for the payload type in the offer. */ … … 572 572 return PJ_EBUG; 573 573 } 574 pjmedia_sdp_attr_get_rtpmap(a, &or );574 pjmedia_sdp_attr_get_rtpmap(a, &or_); 575 575 576 576 /* Find paylaod in answer SDP with matching … … 587 587 * count match 588 588 */ 589 if (!pj_stricmp(&or .enc_name, &ar.enc_name) &&590 or .clock_rate == ar.clock_rate &&591 (pj_stricmp(&or .param, &ar.param)==0 ||589 if (!pj_stricmp(&or_.enc_name, &ar.enc_name) && 590 or_.clock_rate == ar.clock_rate && 591 (pj_stricmp(&or_.param, &ar.param)==0 || 592 592 (ar.param.slen==1 && *ar.param.ptr=='1'))) 593 593 { … … 745 745 */ 746 746 const pjmedia_sdp_attr *a; 747 pjmedia_sdp_rtpmap or ;747 pjmedia_sdp_rtpmap or_; 748 748 pj_bool_t is_codec; 749 749 … … 755 755 return PJMEDIA_SDP_EMISSINGRTPMAP; 756 756 } 757 pjmedia_sdp_attr_get_rtpmap(a, &or );758 759 if (!pj_strcmp2(&or .enc_name, "telephone-event")) {757 pjmedia_sdp_attr_get_rtpmap(a, &or_); 758 759 if (!pj_strcmp2(&or_.enc_name, "telephone-event")) { 760 760 offer_has_telephone_event = 1; 761 761 if (found_matching_telephone_event) … … 782 782 * channel count match 783 783 */ 784 if (!pj_stricmp(&or .enc_name, &lr.enc_name) &&785 or .clock_rate == lr.clock_rate &&786 (pj_strcmp(&or .param, &lr.param)==0 ||787 (or .param.slen==1 && *or.param.ptr=='1')))784 if (!pj_stricmp(&or_.enc_name, &lr.enc_name) && 785 or_.clock_rate == lr.clock_rate && 786 (pj_strcmp(&or_.param, &lr.param)==0 || 787 (or_.param.slen==1 && *or_.param.ptr=='1'))) 788 788 { 789 789 /* Match! */ -
pjproject/trunk/pjsip/include/pjsip/print_util.h
r974 r1240 106 106 PJ_INLINE(void) init_hdr(void *hptr, pjsip_hdr_e htype, void *vptr) 107 107 { 108 pjsip_hdr *hdr = hptr;108 pjsip_hdr *hdr = (pjsip_hdr*) hptr; 109 109 hdr->type = htype; 110 110 hdr->name = hdr->sname = pjsip_hdr_names[htype]; 111 hdr->vptr = vptr;111 hdr->vptr = (pjsip_hdr_vptr*) vptr; 112 112 pj_list_init(hdr); 113 113 } -
pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c
r974 r1240 214 214 215 215 /* Allocate memory. */ 216 cred->response.ptr = pj_pool_alloc(pool, PJSIP_MD5STRLEN);216 cred->response.ptr = (char*) pj_pool_alloc(pool, PJSIP_MD5STRLEN); 217 217 cred->response.slen = PJSIP_MD5STRLEN; 218 218 … … 229 229 */ 230 230 cred->qop = pjsip_AUTH_STR; 231 cred->nc.ptr = pj_pool_alloc(pool, 16);231 cred->nc.ptr = (char*) pj_pool_alloc(pool, 16); 232 232 cred->nc.slen = pj_ansi_snprintf(cred->nc.ptr, 16, "%08u", nc); 233 233 … … 267 267 if (cached_auth->cnonce.slen == 0) { 268 268 /* Save the whole challenge */ 269 cached_auth->last_chal = pjsip_hdr_clone(ses_pool, hdr); 269 cached_auth->last_chal = (pjsip_www_authenticate_hdr*) 270 pjsip_hdr_clone(ses_pool, hdr); 270 271 271 272 /* Create cnonce */ … … 367 368 sess->endpt = (pjsip_endpoint*)rhs->endpt; 368 369 sess->cred_cnt = rhs->cred_cnt; 369 sess->cred_info = pj_pool_alloc(pool, 370 sess->cred_info = (pjsip_cred_info*) 371 pj_pool_alloc(pool, 370 372 sess->cred_cnt*sizeof(pjsip_cred_info)); 371 373 for (i=0; i<rhs->cred_cnt; ++i) { … … 402 404 } else { 403 405 int i; 404 sess->cred_info = pj_pool_alloc(sess->pool, cred_cnt * sizeof(*c)); 406 sess->cred_info = (pjsip_cred_info*) 407 pj_pool_alloc(sess->pool, cred_cnt * sizeof(*c)); 405 408 for (i=0; i<cred_cnt; ++i) { 406 409 sess->cred_info[i].data_type = c[i].data_type; … … 817 820 cached_auth = find_cached_auth(sess, &hchal->challenge.common.realm ); 818 821 if (!cached_auth) { 819 cached_auth = pj_pool_zalloc( sess->pool, sizeof(*cached_auth));822 cached_auth = PJ_POOL_ZALLOC_T( sess->pool, pjsip_cached_auth); 820 823 pj_strdup( sess->pool, &cached_auth->realm, &hchal->challenge.common.realm); 821 824 cached_auth->is_proxy = (hchal->type == PJSIP_H_PROXY_AUTHENTICATE); … … 845 848 846 849 /* Remove branch param in Via header. */ 847 via = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);850 via = (pjsip_via_hdr*) pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL); 848 851 via->branch_param.slen = 0; 849 852 -
pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c
r974 r1240 47 47 PJ_DEF(pjsip_authorization_hdr*) pjsip_authorization_hdr_create(pj_pool_t *pool) 48 48 { 49 pjsip_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 49 pjsip_authorization_hdr *hdr; 50 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_authorization_hdr); 50 51 init_hdr(hdr, PJSIP_H_AUTHORIZATION, &authorization_hdr_vptr); 51 52 pj_list_init(&hdr->credential.common.other_param); … … 55 56 PJ_DEF(pjsip_proxy_authorization_hdr*) pjsip_proxy_authorization_hdr_create(pj_pool_t *pool) 56 57 { 57 pjsip_proxy_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 58 pjsip_proxy_authorization_hdr *hdr; 59 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_proxy_authorization_hdr); 58 60 init_hdr(hdr, PJSIP_H_PROXY_AUTHORIZATION, &authorization_hdr_vptr); 59 61 pj_list_init(&hdr->credential.common.other_param); … … 169 171 } 170 172 171 static pjsip_authorization_hdr* pjsip_authorization_hdr_shallow_clone( pj_pool_t *pool, 172 const pjsip_authorization_hdr *rhs) 173 static pjsip_authorization_hdr* 174 pjsip_authorization_hdr_shallow_clone( pj_pool_t *pool, 175 const pjsip_authorization_hdr *rhs) 173 176 { 174 177 /* This function also serves Proxy-Authorization header. */ 175 pjsip_authorization_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr)); 178 pjsip_authorization_hdr *hdr; 179 hdr = PJ_POOL_ALLOC_T(pool, pjsip_authorization_hdr); 176 180 pj_memcpy(hdr, rhs, sizeof(*hdr)); 177 181 pjsip_param_shallow_clone(pool, &hdr->credential.common.other_param, … … 202 206 PJ_DEF(pjsip_www_authenticate_hdr*) pjsip_www_authenticate_hdr_create(pj_pool_t *pool) 203 207 { 204 pjsip_www_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 208 pjsip_www_authenticate_hdr *hdr; 209 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_www_authenticate_hdr); 205 210 init_hdr(hdr, PJSIP_H_WWW_AUTHENTICATE, &www_authenticate_hdr_vptr); 206 211 pj_list_init(&hdr->challenge.common.other_param); … … 211 216 PJ_DEF(pjsip_proxy_authenticate_hdr*) pjsip_proxy_authenticate_hdr_create(pj_pool_t *pool) 212 217 { 213 pjsip_proxy_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 218 pjsip_proxy_authenticate_hdr *hdr; 219 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_proxy_authenticate_hdr); 214 220 init_hdr(hdr, PJSIP_H_PROXY_AUTHENTICATE, &www_authenticate_hdr_vptr); 215 221 pj_list_init(&hdr->challenge.common.other_param); … … 323 329 { 324 330 /* This function also serves Proxy-Authenticate header. */ 325 pjsip_www_authenticate_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr)); 331 pjsip_www_authenticate_hdr *hdr; 332 hdr = PJ_POOL_ALLOC_T(pool, pjsip_www_authenticate_hdr); 326 333 pj_memcpy(hdr, rhs, sizeof(*hdr)); 327 334 pjsip_param_shallow_clone(pool, &hdr->challenge.common.other_param, -
pjproject/trunk/pjsip/src/pjsip/sip_auth_parser.c
r974 r1240 107 107 108 108 } else { 109 pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));109 pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 110 110 p->name = name; 111 111 p->value = value; … … 169 169 170 170 } else { 171 pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));171 pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 172 172 p->name = name; 173 173 p->value = value; -
pjproject/trunk/pjsip/src/pjsip/sip_auth_server.c
r974 r1240 115 115 pjsip_authorization_hdr *h_auth; 116 116 pjsip_msg *msg = rdata->msg_info.msg; 117 inthtype;117 pjsip_hdr_e htype; 118 118 pj_str_t acc_name; 119 119 pjsip_cred_info cred_info; -
pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
r1026 r1240 70 70 return PJ_ENOMEM; 71 71 72 dlg = pj_pool_zalloc(pool, sizeof(pjsip_dialog));72 dlg = PJ_POOL_ZALLOC_T(pool, pjsip_dialog); 73 73 PJ_ASSERT_RETURN(dlg != NULL, PJ_ENOMEM); 74 74 … … 155 155 param->value.ptr[param->value.slen] = '\0'; 156 156 157 hdr = pjsip_parse_hdr(dlg->pool, ¶m->name, param->value.ptr, 157 hdr = (pjsip_hdr*) 158 pjsip_parse_hdr(dlg->pool, ¶m->name, param->value.ptr, 158 159 param->value.slen, NULL); 159 160 … … 223 224 PJSIP_URI_SCHEME_IS_SIPS(dlg->remote.info->uri)) 224 225 { 225 pjsip_sip_uri *sip_uri = pjsip_uri_get_uri(dlg->remote.info->uri); 226 pjsip_sip_uri *sip_uri = (pjsip_sip_uri *) 227 pjsip_uri_get_uri(dlg->remote.info->uri); 226 228 if (!pj_list_empty(&sip_uri->header_param)) { 227 229 pj_str_t tmp; … … 231 233 232 234 /* Print URI */ 233 tmp.ptr = pj_pool_alloc(dlg->pool, dlg->remote.info_str.slen); 235 tmp.ptr = (char*) pj_pool_alloc(dlg->pool, 236 dlg->remote.info_str.slen); 234 237 tmp.slen = pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, 235 238 sip_uri, tmp.ptr, … … 331 334 * both local and remote URI. 332 335 */ 333 tmp.ptr = pj_pool_alloc(rdata->tp_info.pool, TMP_LEN);336 tmp.ptr = (char*) pj_pool_alloc(rdata->tp_info.pool, TMP_LEN); 334 337 335 338 /* Init local info from the To header. */ 336 dlg->local.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.to); 339 dlg->local.info = (pjsip_fromto_hdr*) 340 pjsip_hdr_clone(dlg->pool, rdata->msg_info.to); 337 341 pjsip_fromto_hdr_set_from(dlg->local.info); 338 342 … … 389 393 390 394 /* Init remote info from the From header. */ 391 dlg->remote.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.from); 395 dlg->remote.info = (pjsip_fromto_hdr*) 396 pjsip_hdr_clone(dlg->pool, rdata->msg_info.from); 392 397 pjsip_fromto_hdr_set_to(dlg->remote.info); 393 398 … … 406 411 407 412 /* Init remote's contact from Contact header. */ 408 contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 413 contact_hdr = (pjsip_hdr*) 414 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 409 415 NULL); 410 416 if (!contact_hdr) { … … 412 418 goto on_error; 413 419 } 414 dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact_hdr); 420 dlg->remote.contact = (pjsip_contact_hdr*) 421 pjsip_hdr_clone(dlg->pool, contact_hdr); 415 422 416 423 /* Init remote's CSeq from CSeq header */ … … 432 439 433 440 /* Call-ID */ 434 dlg->call_id = pjsip_hdr_clone(dlg->pool, rdata->msg_info.cid); 441 dlg->call_id = (pjsip_cid_hdr*) 442 pjsip_hdr_clone(dlg->pool, rdata->msg_info.cid); 435 443 436 444 /* Route set. … … 447 455 448 456 /* Clone the Record-Route, change the type to Route header. */ 449 route = pjsip_hdr_clone(dlg->pool, rr);457 route = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, rr); 450 458 pjsip_routing_hdr_set_route(route); 451 459 … … 457 465 if (rr == (void*)&rdata->msg_info.msg->hdr) 458 466 break; 459 rr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_RECORD_ROUTE, rr); 467 rr = (pjsip_route_hdr*) pjsip_msg_find_hdr(rdata->msg_info.msg, 468 PJSIP_H_RECORD_ROUTE, rr); 460 469 } 461 470 … … 570 579 571 580 /* Clone remote target. */ 572 dlg->target = pjsip_uri_clone(dlg->pool, first_dlg->target);581 dlg->target = (pjsip_uri*) pjsip_uri_clone(dlg->pool, first_dlg->target); 573 582 574 583 /* Clone local info. */ 575 dlg->local.info = pjsip_hdr_clone(dlg->pool, first_dlg->local.info); 584 dlg->local.info = (pjsip_fromto_hdr*) 585 pjsip_hdr_clone(dlg->pool, first_dlg->local.info); 576 586 577 587 /* Clone local tag. */ … … 584 594 585 595 /* Clone local Contact. */ 586 dlg->local.contact = pjsip_hdr_clone(dlg->pool, first_dlg->local.contact); 596 dlg->local.contact = (pjsip_contact_hdr*) 597 pjsip_hdr_clone(dlg->pool, first_dlg->local.contact); 587 598 588 599 /* Clone remote info. */ 589 dlg->remote.info = pjsip_hdr_clone(dlg->pool, first_dlg->remote.info); 600 dlg->remote.info = (pjsip_fromto_hdr*) 601 pjsip_hdr_clone(dlg->pool, first_dlg->remote.info); 590 602 591 603 /* Set remote tag from the response. */ … … 611 623 612 624 /* Clone Call-ID header. */ 613 dlg->call_id = pjsip_hdr_clone(dlg->pool, first_dlg->call_id); 625 dlg->call_id = (pjsip_cid_hdr*) 626 pjsip_hdr_clone(dlg->pool, first_dlg->call_id); 614 627 615 628 /* Duplicate Route-Set. */ … … 619 632 pjsip_route_hdr *h; 620 633 621 h = pjsip_hdr_clone(dlg->pool, r);634 h = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, r); 622 635 pj_list_push_back(&dlg->route_set, h); 623 636 … … 721 734 pjsip_route_hdr *new_r; 722 735 723 new_r = pjsip_hdr_clone(dlg->pool, r);736 new_r = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, r); 724 737 pj_list_push_back(&dlg->route_set, new_r); 725 738 … … 980 993 for (; route != end_list; route = route->next ) { 981 994 pjsip_route_hdr *r; 982 r = pjsip_hdr_shallow_clone( tdata->pool, route );995 r = (pjsip_route_hdr*) pjsip_hdr_shallow_clone( tdata->pool, route ); 983 996 pjsip_routing_hdr_set_route(r); 984 997 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)r); … … 1177 1190 pjsip_msg_find_hdr_by_name(tdata->msg, &hcontact, NULL) == 0) 1178 1191 { 1179 hdr = pjsip_hdr_clone(tdata->pool, dlg->local.contact); 1192 hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, 1193 dlg->local.contact); 1180 1194 pjsip_msg_add_hdr(tdata->msg, hdr); 1181 1195 } … … 1189 1203 PJSIP_H_ALLOW, NULL); 1190 1204 if (c_hdr) { 1191 hdr = pjsip_hdr_clone(tdata->pool, c_hdr);1205 hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, c_hdr); 1192 1206 pjsip_msg_add_hdr(tdata->msg, hdr); 1193 1207 } … … 1201 1215 PJSIP_H_SUPPORTED, NULL); 1202 1216 if (c_hdr) { 1203 hdr = pjsip_hdr_clone(tdata->pool, c_hdr);1217 hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, c_hdr); 1204 1218 pjsip_msg_add_hdr(tdata->msg, hdr); 1205 1219 } … … 1286 1300 * 180 and then 302, the Contact in 302 will not get updated). 1287 1301 */ 1288 hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT, NULL);1302 hdr = (pjsip_hdr*) pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT, NULL); 1289 1303 if (hdr) 1290 1304 pj_list_erase(hdr); … … 1399 1413 while (hdr != hdr_list) { 1400 1414 pjsip_msg_add_hdr(tdata->msg, 1401 pjsip_hdr_clone(tdata->pool, hdr));1415 (pjsip_hdr*)pjsip_hdr_clone(tdata->pool, hdr)); 1402 1416 hdr = hdr->next; 1403 1417 } … … 1527 1541 if (hdr->type == PJSIP_H_RECORD_ROUTE) { 1528 1542 pjsip_route_hdr *r; 1529 r = pjsip_hdr_clone(dlg->pool, hdr);1543 r = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, hdr); 1530 1544 pjsip_routing_hdr_set_route(r); 1531 1545 pj_list_push_back(&dlg->route_set, r); … … 1599 1613 * field of the response. 1600 1614 */ 1601 contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1615 contact = (pjsip_contact_hdr*) 1616 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1602 1617 NULL); 1603 1618 if (contact) { 1604 dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact); 1619 dlg->remote.contact = (pjsip_contact_hdr*) 1620 pjsip_hdr_clone(dlg->pool, contact); 1605 1621 dlg->target = dlg->remote.contact->uri; 1606 1622 } … … 1643 1659 pjsip_contact_hdr *contact; 1644 1660 1645 contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1646 NULL); 1661 contact = (pjsip_contact_hdr*) pjsip_msg_find_hdr(rdata->msg_info.msg, 1662 PJSIP_H_CONTACT, 1663 NULL); 1647 1664 if (contact) { 1648 dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact); 1665 dlg->remote.contact = (pjsip_contact_hdr*) 1666 pjsip_hdr_clone(dlg->pool, contact); 1649 1667 dlg->target = dlg->remote.contact->uri; 1650 1668 } -
pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c
r1098 r1240 154 154 static int cmp_mod_name(void *name, const void *mod) 155 155 { 156 return pj_stricmp( name, &((pjsip_module*)mod)->name);156 return pj_stricmp((const pj_str_t*)name, &((pjsip_module*)mod)->name); 157 157 } 158 158 … … 446 446 447 447 /* Create endpoint. */ 448 endpt = pj_pool_zalloc(pool, sizeof(*endpt));448 endpt = PJ_POOL_ZALLOC_T(pool, pjsip_endpoint); 449 449 endpt->pool = pool; 450 450 endpt->pf = pf; … … 829 829 pj_bool_t mismatch = PJ_FALSE; 830 830 if (port == 0) { 831 inttype;831 pjsip_transport_type_e type; 832 832 type = rdata->tp_info.transport->key.type; 833 833 port = pjsip_transport_get_default_port_for_type(type); -
pjproject/trunk/pjsip/src/pjsip/sip_msg.c
r1220 r1240 241 241 PJ_DEF(pjsip_msg*) pjsip_msg_create( pj_pool_t *pool, pjsip_msg_type_e type) 242 242 { 243 pjsip_msg *msg = pj_pool_alloc(pool, sizeof(pjsip_msg));243 pjsip_msg *msg = PJ_POOL_ALLOC_T(pool, pjsip_msg); 244 244 pj_list_init(&msg->hdr); 245 245 msg->type = type; … … 258 258 if (src->type == PJSIP_REQUEST_MSG) { 259 259 pjsip_method_copy(pool, &dst->line.req.method, &src->line.req.method); 260 dst->line.req.uri = pjsip_uri_clone(pool, src->line.req.uri); 260 dst->line.req.uri = (pjsip_uri*) pjsip_uri_clone(pool, 261 src->line.req.uri); 261 262 } else { 262 263 dst->line.status.code = src->line.status.code; … … 267 268 sh = src->hdr.next; 268 269 while (sh != &src->hdr) { 269 pjsip_hdr *dh = pjsip_hdr_clone(pool, sh);270 pjsip_hdr *dh = (pjsip_hdr*) pjsip_hdr_clone(pool, sh); 270 271 pjsip_msg_add_hdr(dst, dh); 271 272 sh = sh->next; … … 283 284 pjsip_hdr_e hdr_type, const void *start) 284 285 { 285 const pjsip_hdr *hdr= start, *end=&msg->hdr;286 const pjsip_hdr *hdr=(const pjsip_hdr*) start, *end=&msg->hdr; 286 287 287 288 if (hdr == NULL) { … … 299 300 const void *start) 300 301 { 301 const pjsip_hdr *hdr= start, *end=&msg->hdr;302 const pjsip_hdr *hdr=(const pjsip_hdr*)start, *end=&msg->hdr; 302 303 303 304 if (hdr == NULL) { … … 319 320 pjsip_hdr_e hdr_type, void *start) 320 321 { 321 pjsip_hdr *hdr = pjsip_msg_find_hdr(msg, hdr_type, start);322 pjsip_hdr *hdr = (pjsip_hdr*) pjsip_msg_find_hdr(msg, hdr_type, start); 322 323 if (hdr) { 323 324 pj_list_erase(hdr); … … 351 352 352 353 /* Add URI */ 353 uri = pjsip_uri_get_uri(msg->line.req.uri);354 uri = (pjsip_uri*) pjsip_uri_get_uri(msg->line.req.uri); 354 355 len = pjsip_uri_print( PJSIP_URI_IN_REQ_URI, uri, p, end-p); 355 356 if (len < 1) … … 485 486 PJ_DEF(void*) pjsip_hdr_clone( pj_pool_t *pool, const void *hdr_ptr ) 486 487 { 487 const pjsip_hdr *hdr = hdr_ptr;488 const pjsip_hdr *hdr = (const pjsip_hdr*) hdr_ptr; 488 489 return (*hdr->vptr->clone)(pool, hdr_ptr); 489 490 } … … 492 493 PJ_DEF(void*) pjsip_hdr_shallow_clone( pj_pool_t *pool, const void *hdr_ptr ) 493 494 { 494 const pjsip_hdr *hdr = hdr_ptr;495 const pjsip_hdr *hdr = (const pjsip_hdr*) hdr_ptr; 495 496 return (*hdr->vptr->shallow_clone)(pool, hdr_ptr); 496 497 } … … 498 499 PJ_DEF(int) pjsip_hdr_print_on( void *hdr_ptr, char *buf, pj_size_t len) 499 500 { 500 pjsip_hdr *hdr = hdr_ptr;501 pjsip_hdr *hdr = (pjsip_hdr*) hdr_ptr; 501 502 return (*hdr->vptr->print_on)(hdr_ptr, buf, len); 502 503 } … … 563 564 const pj_str_t *hvalue) 564 565 { 565 pjsip_generic_string_hdr *hdr = mem;566 pjsip_generic_string_hdr *hdr = (pjsip_generic_string_hdr*) mem; 566 567 pj_str_t dup_hname, dup_hval; 567 568 … … 625 626 const pjsip_generic_string_hdr *rhs ) 626 627 { 627 pjsip_generic_string_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));628 pjsip_generic_string_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_generic_string_hdr); 628 629 pj_memcpy(hdr, rhs, sizeof(*hdr)); 629 630 return hdr; … … 654 655 int value) 655 656 { 656 pjsip_generic_int_hdr *hdr = mem;657 pjsip_generic_int_hdr *hdr = (pjsip_generic_int_hdr*) mem; 657 658 658 659 init_hdr(hdr, PJSIP_H_OTHER, &generic_int_hdr_vptr); … … 694 695 const pjsip_generic_int_hdr *rhs) 695 696 { 696 pjsip_generic_int_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));697 pjsip_generic_int_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_generic_int_hdr); 697 698 pj_memcpy(hdr, rhs, sizeof(*hdr)); 698 699 return hdr; … … 702 703 const pjsip_generic_int_hdr *rhs ) 703 704 { 704 pjsip_generic_int_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));705 pjsip_generic_int_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_generic_int_hdr); 705 706 pj_memcpy(hdr, rhs, sizeof(*hdr)); 706 707 return hdr; … … 729 730 const pj_str_t *hnames) 730 731 { 731 pjsip_generic_array_hdr *hdr = mem;732 pjsip_generic_array_hdr *hdr = (pjsip_generic_array_hdr*) mem; 732 733 733 734 init_hdr(hdr, PJSIP_H_OTHER, &generic_array_hdr_vptr); … … 773 774 { 774 775 unsigned i; 775 pjsip_generic_array_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));776 pjsip_generic_array_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_generic_array_hdr); 776 777 777 778 pj_memcpy(hdr, rhs, sizeof(*hdr)); … … 787 788 const pjsip_generic_array_hdr *rhs) 788 789 { 789 pjsip_generic_array_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));790 pjsip_generic_array_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_generic_array_hdr); 790 791 pj_memcpy(hdr, rhs, sizeof(*hdr)); 791 792 return hdr; … … 799 800 void *mem ) 800 801 { 801 pjsip_accept_hdr *hdr = mem;802 pjsip_accept_hdr *hdr = (pjsip_accept_hdr*) mem; 802 803 803 804 PJ_UNUSED_ARG(pool); … … 823 824 void *mem ) 824 825 { 825 pjsip_allow_hdr *hdr = mem;826 pjsip_allow_hdr *hdr = (pjsip_allow_hdr*) mem; 826 827 827 828 PJ_UNUSED_ARG(pool); … … 846 847 void *mem ) 847 848 { 848 pjsip_cid_hdr *hdr = mem;849 pjsip_cid_hdr *hdr = (pjsip_cid_hdr*) mem; 849 850 850 851 PJ_UNUSED_ARG(pool); … … 880 881 void *mem ) 881 882 { 882 pjsip_clen_hdr *hdr = mem;883 pjsip_clen_hdr *hdr = (pjsip_clen_hdr*) mem; 883 884 884 885 PJ_UNUSED_ARG(pool); … … 942 943 void *mem ) 943 944 { 944 pjsip_cseq_hdr *hdr = mem;945 pjsip_cseq_hdr *hdr = (pjsip_cseq_hdr*) mem; 945 946 946 947 PJ_UNUSED_ARG(pool); … … 997 998 const pjsip_cseq_hdr *rhs ) 998 999 { 999 pjsip_cseq_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));1000 pjsip_cseq_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_cseq_hdr); 1000 1001 pj_memcpy(hdr, rhs, sizeof(*hdr)); 1001 1002 return hdr; … … 1021 1022 void *mem ) 1022 1023 { 1023 pjsip_contact_hdr *hdr = mem;1024 pjsip_contact_hdr *hdr = (pjsip_contact_hdr*) mem; 1024 1025 1025 1026 PJ_UNUSED_ARG(pool); … … 1113 1114 return hdr; 1114 1115 1115 hdr->uri = pjsip_uri_clone(pool, rhs->uri);1116 hdr->uri = (pjsip_uri*) pjsip_uri_clone(pool, rhs->uri); 1116 1117 hdr->q1000 = rhs->q1000; 1117 1118 hdr->expires = rhs->expires; … … 1124 1125 const pjsip_contact_hdr *rhs) 1125 1126 { 1126 pjsip_contact_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));1127 pjsip_contact_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_contact_hdr); 1127 1128 pj_memcpy(hdr, rhs, sizeof(*hdr)); 1128 1129 pjsip_param_shallow_clone(pool, &hdr->other_param, &rhs->other_param); … … 1150 1151 void *mem ) 1151 1152 { 1152 pjsip_ctype_hdr *hdr = mem;1153 pjsip_ctype_hdr *hdr = (pjsip_ctype_hdr*) mem; 1153 1154 1154 1155 PJ_UNUSED_ARG(pool); … … 1228 1229 int value) 1229 1230 { 1230 pjsip_expires_hdr *hdr = mem;1231 pjsip_expires_hdr *hdr = (pjsip_expires_hdr*) mem; 1231 1232 1232 1233 PJ_UNUSED_ARG(pool); … … 1267 1268 void *mem ) 1268 1269 { 1269 pjsip_from_hdr *hdr = mem;1270 pjsip_from_hdr *hdr = (pjsip_from_hdr*) mem; 1270 1271 1271 1272 PJ_UNUSED_ARG(pool); … … 1286 1287 void *mem ) 1287 1288 { 1288 pjsip_to_hdr *hdr = mem;1289 pjsip_to_hdr *hdr = (pjsip_to_hdr*) mem; 1289 1290 1290 1291 PJ_UNUSED_ARG(pool); … … 1355 1356 hdr->name = rhs->name; 1356 1357 hdr->sname = rhs->sname; 1357 hdr->uri = pjsip_uri_clone(pool, rhs->uri);1358 hdr->uri = (pjsip_uri*) pjsip_uri_clone(pool, rhs->uri); 1358 1359 pj_strdup( pool, &hdr->tag, &rhs->tag); 1359 1360 pjsip_param_clone( pool, &hdr->other_param, &rhs->other_param); … … 1366 1367 const pjsip_fromto_hdr *rhs) 1367 1368 { 1368 pjsip_fromto_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));1369 pjsip_fromto_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_fromto_hdr); 1369 1370 pj_memcpy(hdr, rhs, sizeof(*hdr)); 1370 1371 pjsip_param_shallow_clone( pool, &hdr->other_param, &rhs->other_param); … … 1381 1382 int value) 1382 1383 { 1383 pjsip_max_fwd_hdr *hdr = mem;1384 pjsip_max_fwd_hdr *hdr = (pjsip_max_fwd_hdr*) mem; 1384 1385 1385 1386 PJ_UNUSED_ARG(pool); … … 1407 1408 int value ) 1408 1409 { 1409 pjsip_min_expires_hdr *hdr = mem;1410 pjsip_min_expires_hdr *hdr = (pjsip_min_expires_hdr*) mem; 1410 1411 1411 1412 PJ_UNUSED_ARG(pool); … … 1441 1442 void *mem ) 1442 1443 { 1443 pjsip_rr_hdr *hdr = mem;1444 pjsip_rr_hdr *hdr = (pjsip_rr_hdr*) mem; 1444 1445 1445 1446 PJ_UNUSED_ARG(pool); … … 1461 1462 void *mem ) 1462 1463 { 1463 pjsip_route_hdr *hdr = mem;1464 pjsip_route_hdr *hdr = (pjsip_route_hdr*) mem; 1464 1465 1465 1466 PJ_UNUSED_ARG(pool); … … 1521 1522 const pjsip_routing_hdr *rhs ) 1522 1523 { 1523 pjsip_routing_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));1524 pjsip_routing_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_routing_hdr); 1524 1525 1525 1526 init_hdr(hdr, rhs->type, rhs->vptr); … … 1533 1534 const pjsip_routing_hdr *rhs ) 1534 1535 { 1535 pjsip_routing_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));1536 pjsip_routing_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_routing_hdr); 1536 1537 pj_memcpy(hdr, rhs, sizeof(*hdr)); 1537 1538 pjsip_param_shallow_clone( pool, &hdr->other_param, &rhs->other_param); … … 1547 1548 void *mem ) 1548 1549 { 1549 pjsip_require_hdr *hdr = mem;1550 pjsip_require_hdr *hdr = (pjsip_require_hdr*) mem; 1550 1551 1551 1552 PJ_UNUSED_ARG(pool); … … 1570 1571 int value ) 1571 1572 { 1572 pjsip_retry_after_hdr *hdr = mem;1573 pjsip_retry_after_hdr *hdr = (pjsip_retry_after_hdr*) mem; 1573 1574 1574 1575 PJ_UNUSED_ARG(pool); … … 1594 1595 void *mem ) 1595 1596 { 1596 pjsip_supported_hdr *hdr = mem;1597 pjsip_supported_hdr *hdr = (pjsip_supported_hdr*) mem; 1597 1598 1598 1599 PJ_UNUSED_ARG(pool); … … 1616 1617 void *mem ) 1617 1618 { 1618 pjsip_unsupported_hdr *hdr = mem;1619 pjsip_unsupported_hdr *hdr = (pjsip_unsupported_hdr*) mem; 1619 1620 1620 1621 PJ_UNUSED_ARG(pool); … … 1649 1650 void *mem ) 1650 1651 { 1651 pjsip_via_hdr *hdr = mem;1652 pjsip_via_hdr *hdr = (pjsip_via_hdr*) mem; 1652 1653 1653 1654 PJ_UNUSED_ARG(pool); … … 1756 1757 const pjsip_via_hdr *rhs ) 1757 1758 { 1758 pjsip_via_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));1759 pjsip_via_hdr *hdr = PJ_POOL_ALLOC_T(pool, pjsip_via_hdr); 1759 1760 pj_memcpy(hdr, rhs, sizeof(*hdr)); 1760 1761 pjsip_param_shallow_clone(pool, &hdr->other_param, &rhs->other_param); … … 1774 1775 pj_str_t hvalue; 1775 1776 1776 hvalue.ptr = pj_pool_alloc(pool, 10 + /* code */1777 host->slen + 2 + /* host */1778 text->slen + 2); /* text */1777 hvalue.ptr = (char*) pj_pool_alloc(pool, 10 + /* code */ 1778 host->slen + 2 + /* host */ 1779 text->slen + 2); /* text */ 1779 1780 hvalue.slen = pj_ansi_sprintf(hvalue.ptr, "%u %.*s \"%.*s\"", 1780 1781 code, (int)host->slen, host->ptr, … … 1814 1815 1815 1816 if (len) { 1816 newdata = pj_pool_alloc(pool, len);1817 newdata = (char*) pj_pool_alloc(pool, len); 1817 1818 pj_memcpy(newdata, data, len); 1818 1819 } … … 1856 1857 pj_status_t status; 1857 1858 1858 new_body = pj_pool_alloc(pool, sizeof(pjsip_msg_body));1859 new_body = PJ_POOL_ALLOC_T(pool, pjsip_msg_body); 1859 1860 PJ_ASSERT_RETURN(new_body, NULL); 1860 1861 … … 1874 1875 PJ_ASSERT_RETURN(pool && type && subtype && text, NULL); 1875 1876 1876 body = pj_pool_zalloc(pool, sizeof(pjsip_msg_body));1877 body = PJ_POOL_ZALLOC_T(pool, pjsip_msg_body); 1877 1878 PJ_ASSERT_RETURN(body != NULL, NULL); 1878 1879 -
pjproject/trunk/pjsip/src/pjsip/sip_parser.c
r1228 r1240 251 251 252 252 len = param->slen + pname->slen + pvalue->slen + 3; 253 p = new_param = pj_pool_alloc(pool, len);253 p = new_param = (char*) pj_pool_alloc(pool, len); 254 254 255 255 if (param->slen) { … … 1002 1002 */ 1003 1003 if (ctype_hdr && scanner->curptr!=scanner->end) { 1004 pjsip_msg_body *body = pj_pool_alloc(pool, sizeof(pjsip_msg_body));1004 pjsip_msg_body *body = PJ_POOL_ALLOC_T(pool, pjsip_msg_body); 1005 1005 body->content_type.type = ctype_hdr->media.type; 1006 1006 body->content_type.subtype = ctype_hdr->media.subtype; … … 1023 1023 pjsip_parser_err_report *err_info; 1024 1024 1025 err_info = pj_pool_alloc(pool, sizeof(*err_info));1025 err_info = PJ_POOL_ALLOC_T(pool, pjsip_parser_err_report); 1026 1026 err_info->except_code = PJ_GET_EXCEPTION(); 1027 1027 err_info->line = scanner->line; … … 1251 1251 } 1252 1252 1253 uri = (*func)( scanner, pool, 1254 (opt & PJSIP_PARSE_URI_IN_FROM_TO_HDR)== 0); 1253 uri = (pjsip_uri*) 1254 (*func)(scanner, pool, 1255 (opt & PJSIP_PARSE_URI_IN_FROM_TO_HDR)==0); 1255 1256 1256 1257 … … 1380 1381 1381 1382 } else { 1382 pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));1383 pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 1383 1384 p->name = pname; 1384 1385 p->value = pvalue; … … 1392 1393 do { 1393 1394 pjsip_param *param; 1394 param = pj_pool_alloc(pool, sizeof(pjsip_param));1395 param = PJ_POOL_ALLOC_T(pool, pjsip_param); 1395 1396 int_parse_hparam(scanner, pool, ¶m->name, ¶m->value); 1396 1397 pj_list_insert_before(&url->header_param, param); … … 1624 1625 int_parse_param( scanner, pool, &pname, &pvalue, 0); 1625 1626 if (!parser_stricmp(pname, pjsip_Q_STR) && pvalue.slen) { 1626 char *dot_pos = pj_memchr(pvalue.ptr, '.', pvalue.slen);1627 char *dot_pos = (char*) pj_memchr(pvalue.ptr, '.', pvalue.slen); 1627 1628 if (!dot_pos) { 1628 1629 hdr->q1000 = pj_strtoul(&pvalue); … … 1636 1637 1637 1638 } else { 1638 pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));1639 pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 1639 1640 p->name = pname; 1640 1641 p->value = pvalue; … … 1774 1775 1775 1776 } else { 1776 pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));1777 pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 1777 1778 p->name = pname; 1778 1779 p->value = pvalue; … … 1872 1873 hdr->rport_param = 0; 1873 1874 } else { 1874 pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));1875 pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 1875 1876 p->name = pname; 1876 1877 p->value = pvalue; … … 1912 1913 1913 1914 while (*scanner->curptr == ';') { 1914 pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));1915 pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 1915 1916 int_parse_param(scanner, pool, &p->name, &p->value, 0); 1916 1917 pj_list_insert_before(&hdr->other_param, p); -
pjproject/trunk/pjsip/src/pjsip/sip_resolve.c
r1031 r1240 104 104 105 105 PJ_ASSERT_RETURN(pool && p_res, PJ_EINVAL); 106 resolver = pj_pool_zalloc(pool, sizeof(*resolver));106 resolver = PJ_POOL_ZALLOC_T(pool, pjsip_resolver_t); 107 107 *p_res = resolver; 108 108 … … 279 279 280 280 /* Build the query state */ 281 query = pj_pool_zalloc(pool, sizeof(struct query));281 query = PJ_POOL_ZALLOC_T(pool, struct query); 282 282 pj_ansi_snprintf(query->objname, sizeof(query->objname), "rsvjob%X", 283 283 resolver->job_id++); … … 299 299 query->naptr[0].pref = 0; 300 300 query->naptr[0].type = type; 301 query->naptr[0].target_name.ptr = 301 query->naptr[0].target_name.ptr = (char*) 302 302 pj_pool_alloc(pool, target->addr.host.slen + 12); 303 303 … … 640 640 pj_dns_parsed_packet *pkt) 641 641 { 642 struct query *query = user_data;642 struct query *query = (struct query*) user_data; 643 643 unsigned i; 644 644
Note: See TracChangeset
for help on using the changeset viewer.