diff --git a/Makefile.am b/Makefile.am index d1fcbcb6d..64fdcfce1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,7 +43,7 @@ install-data-hook: $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-hssd $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-epcd -CLEANFILES = -R data +CLEANFILES = -R data debian/test DISTCLEANFILES = $(DIST_ARCHIVES) MAINTAINERCLEANFILES = \ configure config.in \ diff --git a/debian/changelog b/debian/changelog index 83b07b350..53aaef786 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +nextepc (0.2-1~artful2) artful; urgency=medium + + * Fix the compile error [-Werror=pointer] + + -- Sukchan Lee Mon, 30 Oct 2017 13:14:42 +0000 + +nextepc (0.2-1~artful1) artful; urgency=medium + + * Remove mongodb build-dependancy for Ubuntu 17.10(i386) + + -- Sukchan Lee Mon, 30 Oct 2017 12:46:58 +0000 + nextepc (0.2-1~artful) artful; urgency=medium * Ubuntu 17.10(amd64) diff --git a/debian/control b/debian/control index a2299244e..8ea0338e9 100644 --- a/debian/control +++ b/debian/control @@ -15,8 +15,7 @@ Build-Depends: debhelper (>= 9), libgcrypt-dev, libssl-dev, libmongoc-dev, - libbson-dev, - mongodb + libbson-dev Standards-Version: 3.9.6 Vcs-Browser: https://github.com/acetcom/nextepc Vcs-Git: git://github.com/acetcom/nextepc diff --git a/debian/rules b/debian/rules index beb6e2c92..c0a1d2465 100755 --- a/debian/rules +++ b/debian/rules @@ -15,26 +15,29 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all dh $@ --with autoreconf --with systemd override_dh_auto_test: + mongodb_exclude_list=; \ + sctp_exclude_list=; \ + mongodb_forked=no; \ + remove_db_uri_conf=; \ + if which mongod > /dev/null; then \ + if ! ps -ef | grep mongod | grep -v grep > /dev/null; then \ + mongodb_forked=yes; \ + mongod --fork --logpath debian/test/var/log/mongodb.log --dbpath debian/test/db; \ + fi; \ + else \ + remove_db_uri_conf="/DB_URI/d"; \ + mongodb_exclude_list="-x s1setup_test attach_test volte_test handover_test"; \ + fi; \ mkdir -p debian/test/db debian/test/etc/nextepc/freeDiameter debian/test/var/log/nextepc; \ - sed 's?@SYSCONF_DIR@?'`pwd`'/debian/test/etc?g;s?@LOCALSTATE_DIR@?'`pwd`'/debian/test/var?g' support/config/nextepc.conf.in > debian/test/etc/nextepc/nextepc.conf; \ + sed -e 's?@SYSCONF_DIR@?'`pwd`'/debian/test/etc?g;s?@LOCALSTATE_DIR@?'`pwd`'/debian/test/var?g;'$$remove_db_uri_conf'' support/config/nextepc.conf.in > debian/test/etc/nextepc/nextepc.conf; \ for i in `find support/freeDiameter -name '*.conf.in' -printf "%f\n" | sed 's/.in$$//g'`; do \ sed 's?@SYSCONF_DIR@/nextepc?'`pwd`'/support?g;s?@LIB_DIR@/nextepc/\([_a-z0-9]*\)\.so?'`pwd`'/lib/fd/extensions/\1/.libs/\1.so?g' support/freeDiameter/$$i.in > debian/test/etc/nextepc/freeDiameter/$$i; \ done; \ - testcore_excluded_list=; \ - testepc_excluded_list=; \ if ! cat /proc/net/protocols | grep SCTP > /dev/null; then \ - testcore_excluded_list="-x testsctp"; \ - testepc_excluded_list="-x s1setup_test attach_test volte_test handover_test"; \ + sctp_exclude_list="-x testsctp s1setup_test attach_test volte_test handover_test"; \ fi; \ - mongodb_required=yes; \ - if ps -ef | grep mongod | grep -v grep > /dev/null; then \ - mongodb_required=no; \ - fi; \ - if test "x$$mongodb_required" = xyes; then \ - mongod --fork --logpath debian/test/var/log/mongodb.log --dbpath debian/test/db; \ - fi; \ - lib/core/test/testcore $$testcore_excluded_list || exit; \ - test/testepc -f debian/test/etc/nextepc/nextepc.conf -c $$testepc_excluded_list || exit; \ - if test "x$$mongodb_required" = xyes; then \ + lib/core/test/testcore $$sctp_exclude_list || exit; \ + test/testepc -f debian/test/etc/nextepc/nextepc.conf -c $$sctp_exclude_list $$mongodb_exclude_list || exit; \ + if test "x$$mongodb_forked" = xyes; then \ pkill mongod; \ fi; diff --git a/lib/core/src/fsm.c b/lib/core/src/fsm.c index 037c9574b..9a6d80820 100644 --- a/lib/core/src/fsm.c +++ b/lib/core/src/fsm.c @@ -20,7 +20,7 @@ void fsm_init(void *s, void *_e) fsm_t *fsm = s; event_t *e = _e; - if (fsm->initial != (fsm_state_t)0) + if (fsm->initial != NULL) { (*fsm->initial)(s, e); if (fsm->initial != fsm->state) @@ -46,7 +46,7 @@ void fsm_dispatch(void *s, void *_e) fsm->state = (fsm_handler_t)0; (*tmp)(s, e); - if (fsm->state != (fsm_state_t)0) + if (fsm->state != NULL) { if (e) { @@ -91,7 +91,7 @@ void fsm_final(void *s, void *_e) } } - if (fsm->final != (fsm_state_t)0) + if (fsm->final != NULL) { (*fsm->final)(s, e); }