Ignore:
Timestamp:
May 11, 2007 3:14:34 PM (17 years ago)
Author:
bennylp
Message:

HUGE changeset to make the rest of the libraries compile with C++ mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/test-pjsip/msg_test.c

    r1236 r1266  
    187187 
    188188    /* 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); 
    191191 
    192192    /* Compare message type. */ 
     
    661661 
    662662    // Body 
    663     body = pj_pool_zalloc(pool, sizeof(*body)); 
     663    body = PJ_POOL_ZALLOC_T(pool, pjsip_msg_body); 
    664664    msg->body = body; 
    665665    body->content_type.type = pj_str("application"); 
    666666    body->content_type.subtype = pj_str("sdp"); 
    667     body->data =  
     667    body->data = (void*) 
    668668        "v=0\r\n" 
    669669        "o=alice 53655765 2353687637 IN IP4 pc33.atlanta.com\r\n" 
     
    673673        "m=audio 3456 RTP/AVP 0 1 3 99\r\n" 
    674674        "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); 
    676676    body->print_body = &pjsip_print_text_body; 
    677677 
     
    716716 
    717717    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) { 
    719719            pool = pjsip_endpt_create_pool(endpt, NULL, POOL_SIZE, POOL_SIZE); 
    720720            status = test_entry( pool, &test_array[i] ); 
     
    14541454        hname = pj_str(test->hname); 
    14551455        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); 
    14571459        if (parsed_hdr1 == NULL) { 
    14581460            if (test->flags & HDR_FLAG_PARSE_FAIL) { 
     
    14761478            hname = pj_str(test->hshort_name); 
    14771479            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); 
    14791481            if (parsed_hdr2 == NULL) { 
    14801482                PJ_LOG(3,(THIS_FILE, "    error parsing header %s: %s", test->hshort_name, test->hcontent)); 
     
    14901492 
    14911493        /* Print the original header */ 
    1492         input = pj_pool_alloc(pool, 1024); 
     1494        input = (char*) pj_pool_alloc(pool, 1024); 
    14931495        len = pj_ansi_snprintf(input, 1024, "%s: %s", test->hname, test->hcontent); 
    14941496        if (len < 1 || len >= 1024) 
     
    14961498 
    14971499        /* Print the parsed header*/ 
    1498         output = pj_pool_alloc(pool, 1024); 
     1500        output = (char*) pj_pool_alloc(pool, 1024); 
    14991501        len = pjsip_hdr_print_on(parsed_hdr1, output, 1024); 
    15001502        if (len < 1 || len >= 1024) { 
Note: See TracChangeset for help on using the changeset viewer.