Changeset 2303 for pjproject/trunk
- Timestamp:
- Sep 21, 2008 10:01:46 PM (16 years ago)
- Location:
- pjproject/trunk/pjsip/src/test-pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/msg_test.c
r2286 r2303 807 807 static int hdr_test_via_ipv6_3(pjsip_hdr *h); 808 808 static int hdr_test_retry_after1(pjsip_hdr *h); 809 static int hdr_test_subject_utf(pjsip_hdr *h); 809 810 810 811 … … 1023 1024 "10(Already Pending Register)", 1024 1025 &hdr_test_retry_after1 1026 }, 1027 1028 { 1029 /* Non-ASCII UTF-8 characters in Subject */ 1030 "Subject", NULL, 1031 "\xC0\x81", 1032 &hdr_test_subject_utf 1025 1033 } 1026 1034 }; … … 1695 1703 if (pj_strcmp2(&hdr->comment, "Already Pending Register")) 1696 1704 return -2930; 1705 1706 return 0; 1707 } 1708 1709 /* Subject: \xC0\x81 */ 1710 static int hdr_test_subject_utf(pjsip_hdr *h) 1711 { 1712 pjsip_subject_hdr *hdr = (pjsip_subject_hdr*)h; 1713 1714 if (pj_strcmp2(&h->name, "Subject")) 1715 return -2950; 1716 1717 if (pj_strcmp2(&hdr->hvalue, "\xC0\x81")) 1718 return -2960; 1697 1719 1698 1720 return 0; -
pjproject/trunk/pjsip/src/test-pjsip/transport_test.c
r2286 r2303 652 652 { 653 653 pjsip_module mod; 654 pj_ uint32_t next_seq;654 pj_int32_t next_seq; 655 655 pj_bool_t err; 656 656 } mod_load = -
pjproject/trunk/pjsip/src/test-pjsip/uri_test.c
r2287 r2303 79 79 static pjsip_uri *create_uri35( pj_pool_t *pool ); 80 80 static pjsip_uri *create_uri36( pj_pool_t *pool ); 81 static pjsip_uri *create_uri37( pj_pool_t *pool ); 82 static pjsip_uri *create_uri38( pj_pool_t *pool ); 81 83 static pjsip_uri *create_dummy( pj_pool_t *pool ); 82 84 … … 333 335 &create_uri36, 334 336 "sip:[::1];maddr=[::01]" 337 }, 338 { 339 /* 37: Non-ASCII UTF-8 in display name, with quote */ 340 PJ_SUCCESS, 341 "\"\xC0\x81\" <sip:localhost>", 342 &create_uri37, 343 "\"\xC0\x81\" <sip:localhost>" 344 }, 345 { 346 /* 38: Non-ASCII UTF-8 in display name, without quote */ 347 PJ_SUCCESS, 348 "\xC0\x81 <sip:localhost>", 349 &create_uri38, 350 "\"\xC0\x81\" <sip:localhost>" 335 351 } 336 352 … … 704 720 url->maddr_param = pj_str("::01"); 705 721 return (pjsip_uri*)url; 722 723 } 724 725 /* "\"\xC0\x81\" <sip:localhost>" */ 726 static pjsip_uri *create_uri37( pj_pool_t *pool ) 727 { 728 pjsip_name_addr *name; 729 pjsip_sip_uri *url; 730 731 name = pjsip_name_addr_create(pool); 732 name->display = pj_str("\xC0\x81"); 733 734 url = pjsip_sip_uri_create(pool, 0); 735 url->host = pj_str("localhost"); 736 737 name->uri = (pjsip_uri*)url; 738 739 return (pjsip_uri*)name; 740 741 } 742 743 /* "\xC0\x81 <sip:localhost>" */ 744 static pjsip_uri *create_uri38( pj_pool_t *pool ) 745 { 746 pjsip_name_addr *name; 747 pjsip_sip_uri *url; 748 749 name = pjsip_name_addr_create(pool); 750 name->display = pj_str("\xC0\x81"); 751 752 url = pjsip_sip_uri_create(pool, 0); 753 url->host = pj_str("localhost"); 754 755 name->uri = (pjsip_uri*)url; 756 757 return (pjsip_uri*)name; 706 758 707 759 }
Note: See TracChangeset
for help on using the changeset viewer.