Changeset 2407 for pjproject/trunk
- Timestamp:
- Jan 1, 2009 8:56:36 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util-test/resolver_test.c
r2403 r2407 703 703 PJ_UNUSED_ARG(user_data); 704 704 705 pj_assert(status == PJ_SUCCESS);706 pj_assert(resp);707 pj_assert(resp->hdr.anscount == 1);708 pj_assert(resp->ans[0].type == PJ_DNS_TYPE_A);709 pj_assert(resp->ans[0].rdata.a.ip_addr.s_addr == IP_ADDR0);710 711 705 pj_sem_post(sem); 706 707 PJ_ASSERT_ON_FAIL(status == PJ_SUCCESS, return); 708 PJ_ASSERT_ON_FAIL(resp, return); 709 PJ_ASSERT_ON_FAIL(resp->hdr.anscount == 1, return); 710 PJ_ASSERT_ON_FAIL(resp->ans[0].type == PJ_DNS_TYPE_A, return); 711 PJ_ASSERT_ON_FAIL(resp->ans[0].rdata.a.ip_addr.s_addr == IP_ADDR0, return); 712 712 713 } 713 714 … … 779 780 PJ_UNUSED_ARG(resp); 780 781 781 pj_assert(status == PJ_STATUS_FROM_DNS_RCODE(PJ_DNS_RCODE_NXDOMAIN));782 783 782 pj_sem_post(sem); 783 784 PJ_ASSERT_ON_FAIL(status==PJ_STATUS_FROM_DNS_RCODE(PJ_DNS_RCODE_NXDOMAIN), 785 return); 784 786 } 785 787 … … 1015 1017 PJ_UNUSED_ARG(user_data); 1016 1018 1017 pj_assert(status == PJ_SUCCESS);1018 pj_assert(rec->count == 1);1019 pj_assert(rec->entry[0].priority == 1);1020 pj_assert(rec->entry[0].weight == 2);1021 pj_assert(pj_strcmp2(&rec->entry[0].server.name, "sip.somedomain.com")==0);1022 pj_assert(pj_strcmp2(&rec->entry[0].server.alias, "sipalias.somedomain.com")==0);1023 pj_assert(rec->entry[0].server.addr[0].s_addr == IP_ADDR1);1024 pj_assert(rec->entry[0].port == PORT1);1025 1026 1019 pj_sem_post(sem); 1020 1021 PJ_ASSERT_ON_FAIL(status == PJ_SUCCESS, return); 1022 PJ_ASSERT_ON_FAIL(rec->count == 1, return); 1023 PJ_ASSERT_ON_FAIL(rec->entry[0].priority == 1, return); 1024 PJ_ASSERT_ON_FAIL(rec->entry[0].weight == 2, return); 1025 PJ_ASSERT_ON_FAIL(pj_strcmp2(&rec->entry[0].server.name, "sip.somedomain.com")==0, 1026 return); 1027 PJ_ASSERT_ON_FAIL(pj_strcmp2(&rec->entry[0].server.alias, "sipalias.somedomain.com")==0, 1028 return); 1029 PJ_ASSERT_ON_FAIL(rec->entry[0].server.addr[0].s_addr == IP_ADDR1, return); 1030 PJ_ASSERT_ON_FAIL(rec->entry[0].port == PORT1, return); 1031 1032 1027 1033 } 1028 1034 … … 1033 1039 PJ_UNUSED_ARG(user_data); 1034 1040 1035 pj_assert(status == PJ_STATUS_FROM_DNS_RCODE(PJ_DNS_RCODE_NXDOMAIN));1036 pj_assert(rec->count == 0);1037 1038 1041 pj_sem_post(sem); 1042 1043 PJ_ASSERT_ON_FAIL(status==PJ_STATUS_FROM_DNS_RCODE(PJ_DNS_RCODE_NXDOMAIN), 1044 return); 1045 PJ_ASSERT_ON_FAIL(rec->count == 0, return); 1039 1046 } 1040 1047 … … 1176 1183 PJ_UNUSED_ARG(user_data); 1177 1184 1178 pj_assert(status == PJ_SUCCESS);1179 pj_assert(rec->count == 1);1180 pj_assert(rec->entry[0].priority == 0);1181 pj_assert(rec->entry[0].weight == 0);1182 pj_assert(pj_strcmp2(&rec->entry[0].server.name, TARGET)==0);1183 pj_assert(pj_strcmp2(&rec->entry[0].server.alias, "sipalias01." TARGET)==0);1184 pj_assert(rec->entry[0].server.addr[0].s_addr == IP_ADDR2);1185 pj_assert(rec->entry[0].port == PORT2);1186 1187 1185 pj_sem_post(sem); 1186 1187 PJ_ASSERT_ON_FAIL(status == PJ_SUCCESS, return); 1188 PJ_ASSERT_ON_FAIL(rec->count == 1, return); 1189 PJ_ASSERT_ON_FAIL(rec->entry[0].priority == 0, return); 1190 PJ_ASSERT_ON_FAIL(rec->entry[0].weight == 0, return); 1191 PJ_ASSERT_ON_FAIL(pj_strcmp2(&rec->entry[0].server.name, TARGET)==0, 1192 return); 1193 PJ_ASSERT_ON_FAIL(pj_strcmp2(&rec->entry[0].server.alias, "sipalias01." TARGET)==0, 1194 return); 1195 PJ_ASSERT_ON_FAIL(rec->entry[0].server.addr[0].s_addr == IP_ADDR2, return); 1196 PJ_ASSERT_ON_FAIL(rec->entry[0].port == PORT2, return); 1188 1197 } 1189 1198 … … 1307 1316 1308 1317 PJ_UNUSED_ARG(user_data); 1318 PJ_UNUSED_ARG(status); 1319 PJ_UNUSED_ARG(rec); 1309 1320 1310 1321 pj_assert(status == PJ_SUCCESS); 1311 1322 pj_assert(rec->count == PJ_DNS_SRV_MAX_ADDR); 1323 1312 1324 for (i=0; i<PJ_DNS_SRV_MAX_ADDR; ++i) { 1313 1325 unsigned j; -
pjproject/trunk/pjlib/include/pj/compat/cc_armcc.h
r2394 r2407 52 52 #define PJ_INT64_FMT "L" 53 53 54 #define PJ_UNREACHED(x) 55 54 56 #endif /* __PJ_COMPAT_CC_ARMCC_H__ */ 55 57 -
pjproject/trunk/pjlib/include/pj/compat/cc_codew.h
r2394 r2407 50 50 #define PJ_INT64_FMT "L" 51 51 52 #define PJ_UNREACHED(x) 52 53 53 54 #endif /* __PJ_COMPAT_CC_CODEW_H__ */ -
pjproject/trunk/pjlib/include/pj/compat/cc_gcc.h
r2394 r2407 70 70 #endif 71 71 72 #define PJ_UNREACHED(x) 72 73 73 74 #endif /* __PJ_COMPAT_CC_GCC_H__ */ -
pjproject/trunk/pjlib/include/pj/compat/cc_msvc.h
r2394 r2407 39 39 # define _CRT_SECURE_NO_DEPRECATE 40 40 #endif 41 #if PJ_CC_VER_1 >= 8 && !defined(_CRT_SECURE_NO_WARNINGS) 42 # define _CRT_SECURE_NO_WARNINGS 43 /* The above doesn't seem to work, at least on VS2005, so lets use 44 * this construct as well. 45 */ 46 # pragma warning(disable: 4996) 47 #endif 41 48 42 49 #pragma warning(disable: 4127) // conditional expression is constant … … 72 79 #define PJ_INT64_FMT "I64" 73 80 81 #define PJ_UNREACHED(x) 74 82 75 83 #endif /* __PJ_COMPAT_CC_MSVC_H__ */ 84 -
pjproject/trunk/pjlib/include/pj/compat/cc_mwcc.h
r2394 r2407 50 50 #define PJ_INT64_FMT "L" 51 51 52 #define PJ_UNREACHED(x) 52 53 53 54 #endif /* __PJ_COMPAT_CC_MWCC_H__ */ -
pjproject/trunk/pjlib/src/pjlib-test/exception.c
r2394 r2407 55 55 { 56 56 PJ_THROW( ID_1 ); 57 return -1;57 PJ_UNREACHED(return -1;) 58 58 } 59 59 … … 61 61 { 62 62 PJ_THROW( ID_2 ); 63 return -1;63 PJ_UNREACHED(return -1;) 64 64 } 65 65 -
pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c
r2394 r2407 151 151 rc = pj_ioqueue_poll(ioqueue, &timeout); 152 152 } 153 return 0;153 PJ_UNREACHED(return 0;) 154 154 } 155 155 -
pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_sync.c
r2394 r2407 57 57 } 58 58 } 59 return 0;59 PJ_UNREACHED(return 0;) 60 60 } 61 61 … … 161 161 } 162 162 } 163 return 0;163 PJ_UNREACHED(return 0;) 164 164 } 165 165 -
pjproject/trunk/pjmedia/src/pjmedia/rtcp_xr.c
r2394 r2407 405 405 pkt_len = pj_ntohs((pj_uint16_t)rtcp_xr->common.length); 406 406 407 pj_assert((pkt_len + 1) <= (size / 4)); 407 if ((pkt_len + 1) > (size / 4)) 408 return; 408 409 409 410 /* Parse report rpt_types */ -
pjproject/trunk/pjnath/src/pjnath/turn_session.c
r2394 r2407 1077 1077 PJ_LOG(4,(sess->obj_name, "Trying next server")); 1078 1078 set_state(sess, PJ_TURN_STATE_RESOLVED); 1079 break; 1080 1081 } while (status != PJ_SUCCESS); 1079 1080 } while (0); 1082 1081 } 1083 1082 -
pjproject/trunk/pjsip-apps/src/pjsua/main.c
r2394 r2407 53 53 app_destroy(); 54 54 ExitProcess(1); 55 return TRUE;55 PJ_UNREACHED(return TRUE;) 56 56 57 57 default:
Note: See TracChangeset
for help on using the changeset viewer.