Changeset 1266 for pjproject/trunk/pjsip/src/test-pjsip/msg_test.c
- Timestamp:
- May 11, 2007 3:14:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/msg_test.c
r1236 r1266 187 187 188 188 /* Create buffer for comparison. */ 189 str1.ptr = pj_pool_alloc(pool, BUFLEN);190 str2.ptr = pj_pool_alloc(pool, BUFLEN);189 str1.ptr = (char*)pj_pool_alloc(pool, BUFLEN); 190 str2.ptr = (char*)pj_pool_alloc(pool, BUFLEN); 191 191 192 192 /* Compare message type. */ … … 661 661 662 662 // Body 663 body = pj_pool_zalloc(pool, sizeof(*body));663 body = PJ_POOL_ZALLOC_T(pool, pjsip_msg_body); 664 664 msg->body = body; 665 665 body->content_type.type = pj_str("application"); 666 666 body->content_type.subtype = pj_str("sdp"); 667 body->data = 667 body->data = (void*) 668 668 "v=0\r\n" 669 669 "o=alice 53655765 2353687637 IN IP4 pc33.atlanta.com\r\n" … … 673 673 "m=audio 3456 RTP/AVP 0 1 3 99\r\n" 674 674 "a=rtpmap:0 PCMU/8000\r\n"; 675 body->len = pj_native_strlen( body->data);675 body->len = pj_native_strlen((const char*) body->data); 676 676 body->print_body = &pjsip_print_text_body; 677 677 … … 716 716 717 717 for (loop=0; loop<LOOP; ++loop) { 718 for (i=0; i< PJ_ARRAY_SIZE(test_array); ++i) {718 for (i=0; i<(int)PJ_ARRAY_SIZE(test_array); ++i) { 719 719 pool = pjsip_endpt_create_pool(endpt, NULL, POOL_SIZE, POOL_SIZE); 720 720 status = test_entry( pool, &test_array[i] ); … … 1454 1454 hname = pj_str(test->hname); 1455 1455 len = strlen(test->hcontent); 1456 parsed_hdr1 = pjsip_parse_hdr(pool, &hname, test->hcontent, len, &parsed_len); 1456 parsed_hdr1 = (pjsip_hdr*) pjsip_parse_hdr(pool, &hname, 1457 test->hcontent, len, 1458 &parsed_len); 1457 1459 if (parsed_hdr1 == NULL) { 1458 1460 if (test->flags & HDR_FLAG_PARSE_FAIL) { … … 1476 1478 hname = pj_str(test->hshort_name); 1477 1479 len = strlen(test->hcontent); 1478 parsed_hdr2 = pjsip_parse_hdr(pool, &hname, test->hcontent, len, &parsed_len);1480 parsed_hdr2 = (pjsip_hdr*) pjsip_parse_hdr(pool, &hname, test->hcontent, len, &parsed_len); 1479 1481 if (parsed_hdr2 == NULL) { 1480 1482 PJ_LOG(3,(THIS_FILE, " error parsing header %s: %s", test->hshort_name, test->hcontent)); … … 1490 1492 1491 1493 /* Print the original header */ 1492 input = pj_pool_alloc(pool, 1024);1494 input = (char*) pj_pool_alloc(pool, 1024); 1493 1495 len = pj_ansi_snprintf(input, 1024, "%s: %s", test->hname, test->hcontent); 1494 1496 if (len < 1 || len >= 1024) … … 1496 1498 1497 1499 /* Print the parsed header*/ 1498 output = pj_pool_alloc(pool, 1024);1500 output = (char*) pj_pool_alloc(pool, 1024); 1499 1501 len = pjsip_hdr_print_on(parsed_hdr1, output, 1024); 1500 1502 if (len < 1 || len >= 1024) {
Note: See TracChangeset
for help on using the changeset viewer.