Changeset 107 for pjproject/trunk/pjsip/src/test-pjsip/msg_test.c
- Timestamp:
- Jan 5, 2006 11:35:46 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/msg_test.c
r106 r107 48 48 /* 'Normal' message with all headers. */ 49 49 "INVITE sip:user@foo SIP/2.0\n" 50 "From: Hi I'm Joe <sip:joe.user@bar.otherdomain.com>;tag=123457890123456 7890\r"50 "From: Hi I'm Joe <sip:joe.user@bar.otherdomain.com>;tag=123457890123456\r" 51 51 "To: Fellow User <sip:user@foo.bar.domain.com>\r\n" 52 52 "Call-ID: 12345678901234567890@bar\r\n" … … 58 58 "Route: <sip:bigbox3.site3.atlanta.com;lr>,\r\n" 59 59 " <sip:server10.biloxi.com;lr>\r" 60 "Record-Route: <sip:server10.biloxi.com>,\r\n" 60 "Record-Route: <sip:server10.biloxi.com>,\r\n" /* multiple routes+folding*/ 61 61 " <sip:bigbox3.site3.atlanta.com;lr>\n" 62 "Via: SIP/2.0/SCTP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c23 12983.1\n"63 "Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8\n" 62 "Via: SIP/2.0/SCTP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c230\n" 63 "Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8\n" /* folding. */ 64 64 " ;received=192.0.2.1\r\n" 65 65 "Via: SIP/2.0/UDP 10.2.1.1, SIP/2.0/TCP 192.168.1.1\n" 66 66 "Organization: \r" 67 67 "Max-Forwards: 70\n" 68 "X-Header: \r\n" 68 "X-Header: \r\n" /* empty header */ 69 "P-Associated-URI:\r\n" /* empty header without space */ 69 70 "\r\n", 70 71 &create_msg0, … … 352 353 pj_strdup2(pool, &url->host, "foo"); 353 354 354 /* "From: Hi I'm Joe <sip:joe.user@bar.otherdomain.com>;tag=123457890123456 7890\r" */355 /* "From: Hi I'm Joe <sip:joe.user@bar.otherdomain.com>;tag=123457890123456\r" */ 355 356 fromto = pjsip_from_hdr_create(pool); 356 357 pjsip_msg_add_hdr(msg, (pjsip_hdr*)fromto); 357 pj_strdup2(pool, &fromto->tag, "123457890123456 7890");358 pj_strdup2(pool, &fromto->tag, "123457890123456"); 358 359 name_addr = pjsip_name_addr_create(pool); 359 360 fromto->uri = (pjsip_uri*)name_addr; … … 463 464 url->lr_param = 1; 464 465 465 /* "Via: SIP/2.0/SCTP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c23 12983.1\n" */466 /* "Via: SIP/2.0/SCTP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c230\n" */ 466 467 via = pjsip_via_hdr_create(pool); 467 468 pjsip_msg_add_hdr(msg, (pjsip_hdr*)via); 468 469 pj_strdup2(pool, &via->transport, "SCTP"); 469 470 pj_strdup2(pool, &via->sent_by.host, "bigbox3.site3.atlanta.com"); 470 pj_strdup2(pool, &via->branch_param, "z9hG4bK77ef4c23 12983.1");471 pj_strdup2(pool, &via->branch_param, "z9hG4bK77ef4c230"); 471 472 472 473 /* "Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8\n" … … 513 514 str.ptr = "X-Header"; 514 515 str.slen = 8; 516 generic = pjsip_generic_string_hdr_create(pool, &str); 517 pjsip_msg_add_hdr(msg, (pjsip_hdr*)generic); 518 str.ptr = NULL; 519 str.slen = 0; 520 generic->hvalue = str; 521 522 /* P-Associated-URI:\r\n */ 523 str.ptr = "P-Associated-URI"; 524 str.slen = 16; 515 525 generic = pjsip_generic_string_hdr_create(pool, &str); 516 526 pjsip_msg_add_hdr(msg, (pjsip_hdr*)generic); … … 678 688 pool = pjsip_endpt_create_pool(endpt, NULL, POOL_SIZE, POOL_SIZE); 679 689 status = test_entry( pool, &test_array[i] ); 680 pjsip_endpt_ destroy_pool(endpt, pool);690 pjsip_endpt_release_pool(endpt, pool); 681 691 682 692 if (status != PJ_SUCCESS) … … 692 702 pool = pjsip_endpt_create_pool(endpt, NULL, POOL_SIZE, POOL_SIZE); 693 703 status = test_entry( pool, &test_array[i] ); 694 pjsip_endpt_ destroy_pool(endpt, pool);704 pjsip_endpt_release_pool(endpt, pool); 695 705 696 706 if (status != PJ_SUCCESS)
Note: See TracChangeset
for help on using the changeset viewer.