diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 70251da952..bbf71612f8 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Thu Apr 16 17:42:40 UTC 2020 +Thu Apr 30 14:02:03 UTC 2020 diff --git a/libs/sofia-sip/Makefile.am b/libs/sofia-sip/Makefile.am index 7279695865..9ef3ac8a5b 100644 --- a/libs/sofia-sip/Makefile.am +++ b/libs/sofia-sip/Makefile.am @@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = foreign 1.7 -SUBDIRS = libsofia-sip-ua $(GLIB_SUBDIRS) packages # tests s2check utils +SUBDIRS = libsofia-sip-ua $(GLIB_SUBDIRS) packages tests s2check utils DIST_SUBDIRS = s2check libsofia-sip-ua libsofia-sip-ua-glib utils packages \ tests win32 open_c diff --git a/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c b/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c index 440f5d98ce..6c85c47ad0 100644 --- a/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c +++ b/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c @@ -1293,7 +1293,7 @@ int test_mime(void) TEST_1(mp = mp->mp_next); TEST_1(mp->mp_data); - TEST(memcmp(mp->mp_data, CRLF "--" "LaGqGt4BI6Ho" CR LF, mp->mp_len), 0); + TEST(memcmp(mp->mp_data, CRLF "--" "LaGqGt4BI6Ho" CRLF, mp->mp_len), 0); TEST_1(c = mp->mp_content_type); TEST_S(c->c_type, "text/plain"); TEST_S(c->c_subtype, "plain"); diff --git a/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am b/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am index 9beb3bb139..c450fd1a73 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am +++ b/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am @@ -61,7 +61,7 @@ LDADD = libnta.la \ ../msg/libmsg.la \ ../bnf/libbnf.la \ ../su/libsu.la \ - ${top_builddir}/s2check/libs2.a + ${top_builddir}/s2check/libs2.a -lz test_nta_LDFLAGS = -static diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am b/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am index eb2d1acb24..6b6dfaa211 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am +++ b/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am @@ -52,7 +52,7 @@ check_nua_SOURCES = check_nua.c check_nua.h \ check_etsi.c check_simple.c check_nua_LDADD = $(nua_libs) ${top_builddir}/s2check/libs2.a \ - @CHECK_LIBS@ + @CHECK_LIBS@ -lz nua_libs = libnua.la \ ../iptsec/libiptsec.la \ diff --git a/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am b/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am index b3d6e69ac5..80b7669a9d 100644 --- a/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am +++ b/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am @@ -14,6 +14,7 @@ AUTOMAKE_OPTIONS = foreign # Header paths AM_CPPFLAGS = $(INTERNAL_INCLUDES) +LD_FLAGS = -lz # ---------------------------------------------------------------------- # Build targets diff --git a/libs/sofia-sip/s2check/Makefile.am b/libs/sofia-sip/s2check/Makefile.am index a6332ac681..3a16f32ca3 100644 --- a/libs/sofia-sip/s2check/Makefile.am +++ b/libs/sofia-sip/s2check/Makefile.am @@ -9,6 +9,7 @@ # Header paths AM_CPPFLAGS = $(INTERNAL_INCLUDES) +AM_LDFLAGS = -ldl # ---------------------------------------------------------------------- # Build targets diff --git a/libs/sofia-sip/s2check/s2_localinfo.c b/libs/sofia-sip/s2check/s2_localinfo.c index 5c822753d2..1d646a8e2e 100644 --- a/libs/sofia-sip/s2check/s2_localinfo.c +++ b/libs/sofia-sip/s2check/s2_localinfo.c @@ -66,7 +66,7 @@ s2_getlocalinfo(su_localinfo_t const *hints, su_localinfo_t **return_localinfo) { int error = 0, ip4 = 0, ip6 = 0, i; - su_localinfo_t *result = NULL, **rr = &result; + su_localinfo_t *result = NULL, **rr; su_localinfo_t hh[1] = {{ 0 }}; assert(return_localinfo); diff --git a/libs/sofia-sip/s2check/s2sip.c b/libs/sofia-sip/s2check/s2sip.c index 57ef2ee394..9c81c696fe 100644 --- a/libs/sofia-sip/s2check/s2sip.c +++ b/libs/sofia-sip/s2check/s2sip.c @@ -195,13 +195,14 @@ s2_sip_next_request(sip_method_t method, char const *name) struct message *m; for (m = s2sip->received; m; m = m->next) { - if (m->sip->sip_request) + if (m->sip->sip_request) { if (method == sip_method_unknown && name == NULL) return s2_sip_remove_message(m); - if (m->sip->sip_request->rq_method == method && - strcmp(m->sip->sip_request->rq_method_name, name) == 0) - return s2_sip_remove_message(m); + if (m->sip->sip_request->rq_method == method && + strcmp(m->sip->sip_request->rq_method_name, name) == 0) + return s2_sip_remove_message(m); + } } return NULL; diff --git a/libs/sofia-sip/s2check/s2tcase.c b/libs/sofia-sip/s2check/s2tcase.c index d67694c2ce..382aaa3ad7 100644 --- a/libs/sofia-sip/s2check/s2tcase.c +++ b/libs/sofia-sip/s2check/s2tcase.c @@ -57,7 +57,7 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name, if (strcmp(*patterns, "*")) { printf("%s: selected\n", name); } - _tcase_add_test(tc, tf, name, signo, start, end); + _tcase_add_test(tc, tf, name, signo, 0, start, end); return; } } @@ -67,7 +67,7 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name, if (strcmp(*patterns, "*")) { printf("%s: selected\n", name); } - _tcase_add_test(tc, tf, name, signo, start, end); + _tcase_add_test(tc, tf, name, signo, 0, start, end); return; } } diff --git a/libs/sofia-sip/s2check/s2time.c b/libs/sofia-sip/s2check/s2time.c index dd9a914e1d..611b694b6a 100644 --- a/libs/sofia-sip/s2check/s2time.c +++ b/libs/sofia-sip/s2check/s2time.c @@ -57,7 +57,7 @@ s2_timed_logger(void *stream, char const *fmt, va_list ap) { char buffer[4096]; su_time_t now = su_now(); - size_t prefix, wrote; + size_t prefix; int n; snprintf(buffer, sizeof buffer, @@ -70,5 +70,5 @@ s2_timed_logger(void *stream, char const *fmt, va_list ap) prefix = strlen(buffer); n = vsnprintf(buffer + prefix, (sizeof buffer) - prefix, fmt, ap); if (n > 0) - wrote = fwrite(buffer, prefix + n, 1, stream); + fwrite(buffer, prefix + n, 1, stream); } diff --git a/libs/sofia-sip/tests/Makefile.am b/libs/sofia-sip/tests/Makefile.am index 6839d6a132..cabc2b5899 100644 --- a/libs/sofia-sip/tests/Makefile.am +++ b/libs/sofia-sip/tests/Makefile.am @@ -13,7 +13,7 @@ EXTRA_DIST = check_sofia.h check_sofia.c suite_for_nua.c test_nua_SOURCES = test_nua.c test_nua_LDADD = $(check_LIBRARIES) \ - ${sofiabuilddir}/libsofia-sip-ua.la + ${sofiabuilddir}/libsofia-sip-ua.la -ldl check_LIBRARIES = libtestnua.a libtestproxy.a libtestnat.a @@ -47,7 +47,7 @@ check_sofia_LDADD = $(check_LIBRARIES) \ @CHECK_LIBS@ check_dlopen_sofia_CFLAGS = -I$(top_srcdir)/s2check @CHECK_CFLAGS@ -check_dlopen_sofia_LDADD = ${top_builddir}/s2check/libs2.a @CHECK_LIBS@ +check_dlopen_sofia_LDADD = ${top_builddir}/s2check/libs2.a @CHECK_LIBS@ -ldl CLEANFILES = tmp_sippasswd.?????? diff --git a/libs/sofia-sip/utils/sip-dig.c b/libs/sofia-sip/utils/sip-dig.c index b2c81e0bfd..14d5cc3cfd 100644 --- a/libs/sofia-sip/utils/sip-dig.c +++ b/libs/sofia-sip/utils/sip-dig.c @@ -206,7 +206,9 @@ int main(int argc, char *argv[]) int exitcode = 0; int o_sctp = 1, o_tls_sctp = 1, o_verbatim = 1; int family = 0, multiple = 0; + /* char const *dnsserver = NULL; + */ char const *string; url_t *uri = NULL; @@ -272,8 +274,10 @@ int main(int argc, char *argv[]) if (!family) dig->ip4 = 1, dig->ip6 = 2; + /* if (argv[1] && argv[1][0] == '@') dnsserver = argv++[1] + 1; + */ if (!argv[1]) usage(2); diff --git a/libs/sofia-sip/utils/sip-options.c b/libs/sofia-sip/utils/sip-options.c index d7eef497dd..660d3bcf7a 100644 --- a/libs/sofia-sip/utils/sip-options.c +++ b/libs/sofia-sip/utils/sip-options.c @@ -398,7 +398,8 @@ char *readfile(FILE *f) len += fread(buffer + len, 1, 8192, f); } - buffer[len] = '\0'; + if (buffer) + buffer[len] = '\0'; return buffer; }