Changeset 5024 for pjproject/trunk/pjsip/src/test/regc_test.c
- Timestamp:
- Mar 26, 2015 2:51:19 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test/regc_test.c
r4712 r5024 371 371 return -260; 372 372 } 373 if (client_result. interval != client_result.expiration) {373 if (client_result.have_reg && client_result.interval != client_result.expiration) { 374 374 PJ_LOG(3,(THIS_FILE, " error: interval (%d) is different than expiration (%d)", 375 375 client_result.interval, client_result.expiration)); 376 376 return -270; 377 377 } 378 if (client_result. expiration> 0 && client_result.next_reg < 1) {379 PJ_LOG(3,(THIS_FILE, " error: next_reg=%d, expecting positive number because expirationis %d",380 client_result.next_reg, client_result. expiration));378 if (client_result.interval > 0 && client_result.next_reg < 1) { 379 PJ_LOG(3,(THIS_FILE, " error: next_reg=%d, expecting positive number because interval is %d", 380 client_result.next_reg, client_result.interval)); 381 381 return -280; 382 382 } … … 403 403 struct client client_cfg = 404 404 /* error code have_reg expiration contact_cnt auth? destroy*/ 405 { PJ_FALSE, 200, PJ_TRUE, TIMEOUT, 1, PJ_FALSE,PJ_FALSE};405 { PJ_FALSE, 200, PJ_TRUE, TIMEOUT, 1, PJ_FALSE,PJ_FALSE}; 406 406 pj_str_t contact = pj_str("<sip:c@C>"); 407 407 … … 480 480 struct client client_cfg = 481 481 /* error code have_reg expiration contact_cnt auth? destroy*/ 482 { PJ_FALSE, 200, PJ_TRUE, TIMEOUT, 1, PJ_FALSE,PJ_FALSE};482 { PJ_FALSE, 200, PJ_TRUE, TIMEOUT, 1, PJ_FALSE,PJ_FALSE}; 483 483 pj_str_t contact = pj_str("<sip:c@C>"); 484 484 … … 537 537 struct client client_cfg = 538 538 /* error code have_reg expiration contact_cnt auth? destroy*/ 539 { PJ_FALSE, 200, PJ_TRUE, TIMEOUT, 1, PJ_FALSE,PJ_FALSE};539 { PJ_FALSE, 200, PJ_TRUE, TIMEOUT, 1, PJ_FALSE,PJ_FALSE}; 540 540 pj_str_t contacts[] = { 541 541 { "<sip:a>", 7 }, … … 710 710 struct registrar_cfg server_cfg = 711 711 /* respond code auth contact exp_prm expires more_contacts */ 712 { PJ_TRUE, 200, PJ_TRUE, EXACT, 75, 712 { PJ_TRUE, 200, PJ_TRUE, EXACT, 75, 0, {NULL, 0}}; 713 713 struct client client_cfg = 714 714 /* error code have_reg expiration contact_cnt auth? destroy*/ 715 { PJ_TRUE, 401, PJ_FALSE, -1,0, PJ_TRUE, PJ_TRUE};715 { PJ_TRUE, 401, PJ_FALSE, TIMEOUT, 0, PJ_TRUE, PJ_TRUE}; 716 716 pj_str_t contact = pj_str("<sip:c@C>"); 717 717 … … 775 775 /* client expected results: */ 776 776 /* error code have_reg expiration contact_cnt auth?*/ 777 { PJ_FALSE, 502, PJ_FALSE, -1,0, PJ_FALSE}777 { PJ_FALSE, 502, PJ_FALSE, 600, 0, PJ_FALSE} 778 778 }, 779 779 … … 794 794 /* client expected results: */ 795 795 /* error code have_reg expiration contact_cnt auth? */ 796 { PJ_FALSE, 408, PJ_FALSE, -1,0, PJ_FALSE}796 { PJ_FALSE, 408, PJ_FALSE, 600, 0, PJ_FALSE} 797 797 }, 798 798 … … 817 817 /* client expected results: */ 818 818 /* error code have_reg expiration contact_cnt auth?*/ 819 { PJ_FALSE, 200, PJ_TRUE, 75, 1, PJ_FALSE}819 { PJ_FALSE, 200, PJ_TRUE, 75, 1, PJ_FALSE} 820 820 }, 821 821 … … 837 837 /* client expected results: */ 838 838 /* error code have_reg expiration contact_cnt auth?*/ 839 { PJ_FALSE, 200, PJ_TRUE, 75, 1, PJ_TRUE}839 { PJ_FALSE, 200, PJ_TRUE, 75, 1, PJ_TRUE} 840 840 }, 841 841 … … 855 855 /* registrar config: */ 856 856 /* respond code auth contact exp_prm expires more_contacts */ 857 { PJ_TRUE, 200, PJ_FALSE, EXACT, 857 { PJ_TRUE, 200, PJ_FALSE, EXACT, 75, 65, {"<sip:a@a>;expires=70", 0}}, 858 858 859 859 /* client expected results: */ 860 860 /* error code have_reg expiration contact_cnt auth?*/ 861 { PJ_FALSE, 200, PJ_TRUE, 75, 2, PJ_FALSE}861 { PJ_FALSE, 200, PJ_TRUE, 75, 2, PJ_FALSE} 862 862 }, 863 863 … … 884 884 /* client expected results: */ 885 885 /* error code have_reg expiration contact_cnt auth?*/ 886 { PJ_FALSE, 200, PJ_TRUE, 75, 1, PJ_FALSE}886 { PJ_FALSE, 200, PJ_TRUE, 75, 1, PJ_FALSE} 887 887 }, 888 888 … … 910 910 /* client expected results: */ 911 911 /* error code have_reg expiration contact_cnt auth?*/ 912 { PJ_FALSE, 200, PJ_TRUE, 75, 2, PJ_FALSE}912 { PJ_FALSE, 200, PJ_TRUE, 75, 2, PJ_FALSE} 913 913 }, 914 914 … … 934 934 /* client expected results: */ 935 935 /* error code have_reg expiration contact_cnt auth?*/ 936 { PJ_FALSE, 202, PJ_TRUE, 75, 1, PJ_FALSE}936 { PJ_FALSE, 202, PJ_TRUE, 75, 1, PJ_FALSE} 937 937 }, 938 938 … … 958 958 /* client expected results: */ 959 959 /* error code have_reg expiration contact_cnt auth?*/ 960 { PJ_FALSE, 200, PJ_TRUE, 65, 2, PJ_FALSE}960 { PJ_FALSE, 200, PJ_TRUE, 65, 2, PJ_FALSE} 961 961 }, 962 962 … … 980 980 /* client expected results: */ 981 981 /* error code have_reg expiration contact_cnt auth?*/ 982 { PJ_FALSE, 200, PJ_TRUE, 65, 0, PJ_FALSE}982 { PJ_FALSE, 200, PJ_TRUE, 65, 0, PJ_FALSE} 983 983 }, 984 984 … … 1001 1001 /* client expected results: */ 1002 1002 /* error code have_reg expiration contact_cnt auth?*/ 1003 { PJ_FALSE, 200, PJ_TRUE, 600,0, PJ_FALSE}1003 { PJ_FALSE, 200, PJ_TRUE, 600, 0, PJ_FALSE} 1004 1004 }, 1005 1005 };
Note: See TracChangeset
for help on using the changeset viewer.