summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-09-24 21:16:48 +0000
committerBenny Prijono <bennylp@teluu.com>2007-09-24 21:16:48 +0000
commitf05edf53d07c97c82a1f618f54904442a9efada4 (patch)
tree43d1a614a62900dcd57588da8e56be57c2a703f4
parentc326f938bbf72127885ac09179912b8a2cbfb030 (diff)
Fixed several unit test failures: typecast error on C++ mode, SIP parsing, etc.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1451 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjnath/src/pjnath-test/stun.c2
-rw-r--r--pjsip/src/pjsip-ua/sip_reg.c3
-rw-r--r--pjsip/src/test-pjsip/msg_test.c2
-rw-r--r--self-test.mak5
4 files changed, 8 insertions, 4 deletions
diff --git a/pjnath/src/pjnath-test/stun.c b/pjnath/src/pjnath-test/stun.c
index 29a8eb1a..32a31719 100644
--- a/pjnath/src/pjnath-test/stun.c
+++ b/pjnath/src/pjnath-test/stun.c
@@ -637,7 +637,7 @@ static int fingerprint_test_vector()
}
pos = cmp_buf(buf, (const pj_uint8_t*)v->pdu, len);
- if (pos != -1) {
+ if (pos != (unsigned)-1) {
PJ_LOG(1,(THIS_FILE, " Message mismatch at byte %d", pos));
rc = -1060;
goto on_return;
diff --git a/pjsip/src/pjsip-ua/sip_reg.c b/pjsip/src/pjsip-ua/sip_reg.c
index df42c539..41065aa0 100644
--- a/pjsip/src/pjsip-ua/sip_reg.c
+++ b/pjsip/src/pjsip-ua/sip_reg.c
@@ -200,7 +200,8 @@ static pj_status_t set_contact( pjsip_regc *regc,
pj_str_t tmp;
pj_strdup_with_null(regc->pool, &tmp, &contact[i]);
- hdr = pjsip_parse_hdr(regc->pool, &CONTACT, tmp.ptr, tmp.slen, NULL);
+ hdr = (pjsip_hdr*)
+ pjsip_parse_hdr(regc->pool, &CONTACT, tmp.ptr, tmp.slen, NULL);
if (hdr == NULL) {
PJ_LOG(4,(THIS_FILE, "Invalid Contact URI: \"%.*s\"",
(int)tmp.slen, tmp.ptr));
diff --git a/pjsip/src/test-pjsip/msg_test.c b/pjsip/src/test-pjsip/msg_test.c
index 62f85fbe..ce6c372f 100644
--- a/pjsip/src/test-pjsip/msg_test.c
+++ b/pjsip/src/test-pjsip/msg_test.c
@@ -1085,7 +1085,7 @@ static int hdr_test_cid(pjsip_hdr *h)
if (h->type != PJSIP_H_CALL_ID)
return -1510;
- if (pj_strcmp2(&hdr->id, "-.!%*_+`'~()<>:\\\"/[]?{}\r\n"))
+ if (pj_strcmp2(&hdr->id, "-.!%*_+`'~()<>:\\\"/[]?{}"))
return -1520;
return 0;
diff --git a/self-test.mak b/self-test.mak
index 502c6a6b..7685f9ef 100644
--- a/self-test.mak
+++ b/self-test.mak
@@ -14,7 +14,9 @@ PJSUA_OPT=--null-audio
build_test: distclean rm_build_mak build_mak everything cpp_prep cpp_test cpp_post everything
-all: build_test pjlib_test pjlib_util_test pjnath_test pjsip_test pjsua_test
+run_test: pjlib_test pjlib_util_test pjnath_test pjsip_test pjsua_test
+
+all: build_test run_test
CPP_DIR=pjlib pjlib-util pjnath pjmedia pjsip
@@ -57,6 +59,7 @@ cpp_post:
make -f c++-build.mak clean
pjsua_test: pjsua_config_file pjsua_local_port0 pjsua_ip_addr pjsua_no_tcp pjsua_no_udp pjsua_outbound pjsua_use_ice pjsua_add_codec pjsua_clock_rate pjsua_play_file pjsua_play_tone pjsua_rec_file pjsua_rtp_port pjsua_quality pjsua_ptime pjsua_ectail
+ @echo pjsua_test completed successfully
pjsua_config_file:
touch testconfig.cfg