summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Alteholz <debian@alteholz.de>2018-05-16 19:50:09 +0200
committerThorsten Alteholz <debian@alteholz.de>2018-05-16 19:50:09 +0200
commit20e9fa8a9b9ec0ea270127141019363e935f4d39 (patch)
treea92157dd5f768e93dbe3336f1c8e14f4a620b9bd
parent2ad447fb95a63d80584b2792a4f4fbb6ddbfd55d (diff)
Import Upstream version 0.5.0
-rw-r--r--configure.ac40
-rwxr-xr-xcontrib/jenkins.sh11
-rw-r--r--debian/changelog37
-rw-r--r--debian/control10
-rw-r--r--debian/copyright4
-rw-r--r--debian/libosmotrau2.install (renamed from debian/libosmotrau1.install)0
-rwxr-xr-xdebian/rules3
-rwxr-xr-xgit-version-gen4
-rw-r--r--include/osmocom/abis/e1_input.h3
-rw-r--r--include/osmocom/trau/osmo_ortp.h3
-rw-r--r--src/Makefile.am2
-rw-r--r--src/e1_input.c2
-rw-r--r--src/e1_input_vty.c3
-rw-r--r--src/init.c2
-rw-r--r--src/input/dahdi.c2
-rw-r--r--src/input/ipa.c48
-rw-r--r--src/input/ipaccess.c13
-rw-r--r--src/input/lapd.c2
-rw-r--r--src/input/lapd_pcap.c2
-rw-r--r--src/input/misdn.c2
-rw-r--r--src/input/rs232.c2
-rw-r--r--src/input/unixsocket.c7
-rw-r--r--src/ipa_proxy.c1
-rw-r--r--src/subchan_demux.c2
-rw-r--r--src/trau/osmo_ortp.c9
-rw-r--r--src/trau_frame.c2
-rw-r--r--tests/e1inp_ipa_bsc_test.c4
-rw-r--r--tests/e1inp_ipa_bts_test.c4
-rw-r--r--tests/ipa_proxy_test.c4
-rw-r--r--tests/ipa_recv/ipa_recv_test.c8
30 files changed, 174 insertions, 62 deletions
diff --git a/configure.ac b/configure.ac
index eb7733e..0aca550 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,18 @@ AC_CONFIG_MACRO_DIR([m4])
CFLAGS="$CFLAGS -Wall"
CPPFLAGS="$CPPFLAGS -Wall"
+AC_ARG_ENABLE(sanitize,
+ [AS_HELP_STRING(
+ [--enable-sanitize],
+ [Compile with address sanitizer enabled],
+ )],
+ [sanitize=$enableval], [sanitize="no"])
+if test x"$sanitize" = x"yes"
+then
+ CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
+ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
+fi
+
# The following test is taken from WebKit's webkit.m4
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden "
@@ -47,9 +59,9 @@ AC_SUBST(SYMBOL_VISIBILITY)
dnl Generate the output
AM_CONFIG_HEADER(config.h)
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.0)
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
-PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.10)
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.11.0)
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.11.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.11.0)
PKG_CHECK_MODULES(ORTP, ortp >= 0.22.0)
AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built))
@@ -66,6 +78,24 @@ then
CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
fi
+AC_ARG_ENABLE(werror,
+ [AS_HELP_STRING(
+ [--enable-werror],
+ [Turn all compiler warnings into errors, with exceptions:
+ a) deprecation (allow upstream to mark deprecation without breaking builds);
+ b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds)
+ ]
+ )],
+ [werror=$enableval], [werror="no"])
+if test x"$werror" = x"yes"
+then
+ WERROR_FLAGS="-Werror"
+ WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
+ WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
+ CFLAGS="$CFLAGS $WERROR_FLAGS"
+ CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
+fi
+
_cflags_save=$CFLAGS
CFLAGS="$CFLAGS $ORTP_CFLAGS"
AC_COMPILE_IFELSE(
@@ -80,7 +110,7 @@ AC_COMPILE_IFELSE(
CFLAGS=$_cflags_save
_cflags_save=$CFLAGS
-CFLAGS="$CFLAGS $ORTP_CFLAGS"
+CFLAGS="$CFLAGS $ORTP_CFLAGS -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <ortp/ortp.h>
@@ -93,6 +123,8 @@ AC_COMPILE_IFELSE(
[rtp_session_signal_connect requires ulong parameter])])
CFLAGS=$_cflags_save
+AC_MSG_RESULT([CFLAGS="$CFLAGS"])
+AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
AC_OUTPUT(
libosmoabis.pc
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 769d5a7..6a76044 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -13,12 +13,13 @@ deps="$base/deps"
inst="$deps/install"
export deps inst
+osmo-clean-workspace.sh
+
mkdir "$deps" || true
-rm -rf "$inst"
-osmo-build-dep.sh libosmocore
+verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
+osmo-build-dep.sh libosmocore "" --disable-doxygen
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
@@ -32,7 +33,9 @@ echo
set -x
autoreconf --install --force
-./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror"
+./configure --enable-sanitize --enable-werror
$MAKE $PARALLEL_MAKE
$MAKE distcheck \
|| cat-testlogs.sh
+
+osmo-clean-workspace.sh
diff --git a/debian/changelog b/debian/changelog
index 13c0996..4c48e6e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,40 @@
+libosmo-abis (0.5.0) unstable; urgency=medium
+
+ [ Max ]
+ * Use value string check from osmo-ci
+ * cosmetic: update ipaccess_bts_handle_ccm()
+ * IPA: log remote address
+
+ [ Neels Hofmeyr ]
+ * cosmetic: ipa.c: use msgb_dequeue(), drop local var
+ * jenkins: use osmo-clean-workspace.sh before and after build
+ * vty: skip installing cmds now always installed by default
+ * add --enable-sanitize config option
+ * configure: add --enable-werror
+ * jenkins.sh: use --enable-werror configure flag, not CFLAGS
+
+ [ Alexander Couzens ]
+ * debian/rules: show testsuite.log when tests are failing
+ * unixsocket: fix a potential string overflow
+
+ [ Harald Welte ]
+ * debian/copyright: fix upstream-name
+ * Add SPDX-License-Identifier to all source files
+ * Add a new osmo_rtp_set_source_desc() function to set the RTCP SDES items
+ * debian/control: Fix Vcs-Browser
+
+ [ Pau Espin Pedrol ]
+ * contrib: jenkins.sh: Disable doxygen in libosmocore build
+ * e1_input.h: Remove dead declaration of unexistent API ipaccess_setup
+ * configure.ac: Fix condition check for RTP_SIGNAL_PTR_CAST define
+ * use osmo_init_logging2
+ * git-version-gen: Check first for new tag format
+
+ [ Stefan Sperling ]
+ * preserve 'when' flags of new osmo_fd in ipaccess_rcvmsg()
+
+ -- Pau Espin Pedrol <pespin@sysmocom.de> Thu, 03 May 2018 16:12:04 +0200
+
libosmo-abis (0.4.0) unstable; urgency=medium
* Move forward towards a new release.
diff --git a/debian/control b/debian/control
index 5df6c95..10295e6 100644
--- a/debian/control
+++ b/debian/control
@@ -15,13 +15,13 @@ Build-Depends: debhelper (>= 9),
libortp-dev
Standards-Version: 3.9.7
Vcs-Git: git://git.osmocom.org/libosmo-abis.git
-Vcs-Browser: http://git.osmocom.org/gitweb?p=libosmo-abis.git;a=summary
+Vcs-Browser: http://git.osmocom.org/libosmo-abis/
Homepage: https://projects.osmocom.org/projects/libosmo-abis
Package: libosmo-abis
Section: oldlibs
Architecture: any
-Depends: libosmoabis5 (= ${binary:Version}), libosmotrau1 (= ${binary:Version}), ${misc:Depends}
+Depends: libosmoabis5 (= ${binary:Version}), libosmotrau2 (= ${binary:Version}), ${misc:Depends}
Multi-Arch: same
Description: Legacy package for libosmo-abis
libosmo-abis is an empty package helping in the transition to one
@@ -40,7 +40,7 @@ Description: GSM A-bis handling
It also implements drivers for mISDN and DAHDI based E1 cards, as well as some
A-bis/IP dialects.
-Package: libosmotrau1
+Package: libosmotrau2
Section: libs
Architecture: any
Multi-Arch: same
@@ -58,7 +58,7 @@ Architecture: any
Multi-Arch: same
Section: libdevel
Depends: ${misc:Depends},
- libosmotrau1 (= ${binary:Version}),
+ libosmotrau2 (= ${binary:Version}),
libosmoabis5 (= ${binary:Version})
Description: Development headers for A-bis interface
The libosmo-abis library contains common/shared code regarding the A-bis
@@ -72,7 +72,7 @@ Multi-Arch: same
Section: debug
Priority: extra
Depends: libosmoabis5 (= ${binary:Version}),
- libosmotrau1 (= ${binary:Version}),
+ libosmotrau2 (= ${binary:Version}),
${misc:Depends}
Description: Debug symbols for A-bis interface
The libosmo-abis library contains common/shared code regarding the A-bis
diff --git a/debian/copyright b/debian/copyright
index fdcf686..41573fe 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,5 +1,5 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: libosmocore
+Upstream-Name: libosmo-abis
Source: git://git.osmocom.org/libosmo-abis.git
Files: *
@@ -9,7 +9,7 @@ Copyright: 2008 Daniel Willmann <daniel@totalueberwachung.de>
2010,2014 On-Waves
2011-2014 Pablo Neira Ayuso <pablo@gnumonks.org>
2012 Tobias Engel
- 2014 Sysmocom s.f.m.c. GmBH
+ 2014 sysmocom - s.f.m.c. GmBH
License: AGPL-3+
Files: src/input/lapd.c
diff --git a/debian/libosmotrau1.install b/debian/libosmotrau2.install
index 5a25619..5a25619 100644
--- a/debian/libosmotrau1.install
+++ b/debian/libosmotrau2.install
diff --git a/debian/rules b/debian/rules
index cec3c9f..10ba659 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,3 +21,6 @@ override_dh_autoreconf:
override_dh_clean:
dh_clean
rm -f tests/package.m4 tests/testsuite .version .tarball-version
+
+override_dh_auto_test:
+ dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
diff --git a/git-version-gen b/git-version-gen
index 42cf3d2..2a9abb5 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -93,8 +93,8 @@ if test -n "$v"
then
: # use $v
elif
- v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
- || git describe --abbrev=4 HEAD 2>/dev/null` \
+ v=`git describe --abbrev=4 HEAD 2>/dev/null \
+ || git describe --abbrev=4 --match='v*' HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;
v[0-9]*) ;;
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 1a701f9..3fbce5b 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -303,9 +303,6 @@ int e1inp_line_update(struct e1inp_line *line);
int e1inp_vty_init(void);
-struct gsm_network;
-int ipaccess_setup(struct gsm_network *gsmnet);
-
/* activate superchannel or deactive to use timeslots. only valid for unixsocket driver */
void e1inp_ericsson_set_altc(struct e1inp_line *unixlinue, int superchannel);
diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h
index 578b1cb..5fb2960 100644
--- a/include/osmocom/trau/osmo_ortp.h
+++ b/include/osmocom/trau/osmo_ortp.h
@@ -100,5 +100,8 @@ void osmo_rtp_socket_stats(struct osmo_rtp_socket *rs,
uint32_t *recv_packets, uint32_t *recv_octets,
uint32_t *recv_lost, uint32_t *last_jitter);
+void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname,
+ const char *name, const char *email, const char *phone,
+ const char *loc, const char *tool, const char *note);
#endif /* _OSMO_ORTP_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index 7395d17..ab42d38 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,7 @@
# Please read chapter "Library interface versions" of the libtool documentation
# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html
ABIS_LIBVERSION=6:0:0
-TRAU_LIBVERSION=2:0:0
+TRAU_LIBVERSION=3:0:1
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS)
diff --git a/src/e1_input.c b/src/e1_input.c
index 3cf810f..29ba440 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -4,6 +4,8 @@
*
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c
index 9d69586..0e4575f 100644
--- a/src/e1_input_vty.c
+++ b/src/e1_input_vty.c
@@ -2,6 +2,8 @@
/* (C) 2011 by Harald Welte <laforge@gnumonks.org>
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -380,7 +382,6 @@ int e1inp_vty_init(void)
install_element(CONFIG_NODE, &cfg_e1inp_cmd);
install_node(&e1inp_node, e1inp_config_write);
- vty_install_default(L_E1INP_NODE);
install_element(L_E1INP_NODE, &cfg_e1_line_driver_cmd);
install_element(L_E1INP_NODE, &cfg_e1_line_port_cmd);
install_element(L_E1INP_NODE, &cfg_e1_line_socket_cmd);
diff --git a/src/init.c b/src/init.c
index 73453c4..b522592 100644
--- a/src/init.c
+++ b/src/init.c
@@ -1,6 +1,8 @@
/* (C) 2011 by Harald Welte <laforge@gnumonks.org>
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index 911f862..47276a7 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -6,6 +6,8 @@
*
* All Rights Reserved
*
+ * SPDX-License-Identifier: GPL-2.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
diff --git a/src/input/ipa.c b/src/input/ipa.c
index ce155ce..fc1ca50 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -23,6 +23,8 @@
#include <osmocom/abis/ipa.h>
+#define LOGIPA(link, level, fmt, args...) LOGP(DLINP, level, "%s:%u " fmt, link->addr, link->port, ## args)
+
void ipa_msg_push_header(struct msgb *msg, uint8_t proto)
{
struct ipaccess_head *hh;
@@ -51,20 +53,20 @@ static void ipa_client_read(struct ipa_client_conn *link)
struct msgb *msg;
int ret;
- LOGP(DLINP, LOGL_DEBUG, "message received\n");
+ LOGIPA(link, LOGL_DEBUG, "message received\n");
ret = ipa_msg_recv_buffered(ofd->fd, &msg, &link->pending_msg);
if (ret < 0) {
if (ret == -EAGAIN)
return;
if (ret == -EPIPE || ret == -ECONNRESET)
- LOGP(DLINP, LOGL_ERROR, "lost connection with server\n");
+ LOGIPA(link, LOGL_ERROR, "lost connection with server\n");
ipa_client_conn_close(link);
if (link->updown_cb)
link->updown_cb(link, 0);
return;
} else if (ret == 0) {
- LOGP(DLINP, LOGL_ERROR, "connection closed with server\n");
+ LOGIPA(link, LOGL_ERROR, "connection closed with server\n");
ipa_client_conn_close(link);
if (link->updown_cb)
link->updown_cb(link, 0);
@@ -87,7 +89,7 @@ static int ipa_client_write_default_cb(struct ipa_client_conn *link)
struct llist_head *lh;
int ret;
- LOGP(DLINP, LOGL_DEBUG, "sending data\n");
+ LOGIPA(link, LOGL_DEBUG, "sending data\n");
if (llist_empty(&link->tx_queue)) {
ofd->when &= ~BSC_FD_WRITE;
@@ -104,7 +106,7 @@ static int ipa_client_write_default_cb(struct ipa_client_conn *link)
if (link->updown_cb)
link->updown_cb(link, 0);
}
- LOGP(DLINP, LOGL_ERROR, "error to send\n");
+ LOGIPA(link, LOGL_ERROR, "error to send\n");
}
msgb_free(msg);
return 0;
@@ -126,18 +128,18 @@ static int ipa_client_fd_cb(struct osmo_fd *ofd, unsigned int what)
return 0;
}
ofd->when &= ~BSC_FD_WRITE;
- LOGP(DLINP, LOGL_NOTICE, "connection done.\n");
+ LOGIPA(link, LOGL_NOTICE, "connection done\n");
link->state = IPA_CLIENT_LINK_STATE_CONNECTED;
if (link->updown_cb)
link->updown_cb(link, 1);
break;
case IPA_CLIENT_LINK_STATE_CONNECTED:
if (what & BSC_FD_READ) {
- LOGP(DLINP, LOGL_DEBUG, "connected read\n");
+ LOGIPA(link, LOGL_DEBUG, "connected read\n");
ipa_client_read(link);
}
if (what & BSC_FD_WRITE) {
- LOGP(DLINP, LOGL_DEBUG, "connected write\n");
+ LOGIPA(link, LOGL_DEBUG, "connected write\n");
ipa_client_write(link);
}
break;
@@ -335,18 +337,18 @@ static void ipa_server_conn_read(struct ipa_server_conn *conn)
struct msgb *msg;
int ret;
- LOGP(DLINP, LOGL_DEBUG, "message received\n");
+ LOGIPA(conn, LOGL_DEBUG, "message received\n");
ret = ipa_msg_recv_buffered(ofd->fd, &msg, &conn->pending_msg);
if (ret < 0) {
if (ret == -EAGAIN)
return;
if (ret == -EPIPE || ret == -ECONNRESET)
- LOGP(DLINP, LOGL_ERROR, "lost connection with server\n");
+ LOGIPA(conn, LOGL_ERROR, "lost connection with server\n");
ipa_server_conn_destroy(conn);
return;
} else if (ret == 0) {
- LOGP(DLINP, LOGL_ERROR, "connection closed with server\n");
+ LOGIPA(conn, LOGL_ERROR, "connection closed with server\n");
ipa_server_conn_destroy(conn);
return;
}
@@ -358,24 +360,20 @@ static void ipa_server_conn_read(struct ipa_server_conn *conn)
static void ipa_server_conn_write(struct ipa_server_conn *conn)
{
- struct osmo_fd *ofd = &conn->ofd;
struct msgb *msg;
- struct llist_head *lh;
int ret;
- LOGP(DLINP, LOGL_DEBUG, "sending data\n");
+ LOGIPA(conn, LOGL_DEBUG, "sending data\n");
+ msg = msgb_dequeue(&conn->tx_queue);
- if (llist_empty(&conn->tx_queue)) {
- ofd->when &= ~BSC_FD_WRITE;
+ if (!msg) {
+ conn->ofd.when &= ~BSC_FD_WRITE;
return;
}
- lh = conn->tx_queue.next;
- llist_del(lh);
- msg = llist_entry(lh, struct msgb, list);
ret = send(conn->ofd.fd, msg->data, msg->len, 0);
if (ret < 0) {
- LOGP(DLINP, LOGL_ERROR, "error to send\n");
+ LOGIPA(conn, LOGL_ERROR, "error to send\n");
}
msgb_free(msg);
}
@@ -454,7 +452,7 @@ int ipa_server_conn_ccm(struct ipa_server_conn *conn, struct msgb *msg)
break;
default:
/* Error */
- LOGP(DLINP, LOGL_ERROR, "Unexpected return from "
+ LOGIPA(conn, LOGL_ERROR, "Unexpected return from "
"ipa_ccm_rcvmsg_base: %d\n", rc);
goto err;
}
@@ -464,18 +462,18 @@ int ipa_server_conn_ccm(struct ipa_server_conn *conn, struct msgb *msg)
rc = ipa_ccm_idtag_parse(&tlvp, (uint8_t *)msg->l2h + 2,
msgb_l2len(msg)-2);
if (rc < 0) {
- LOGP(DLINP, LOGL_ERROR, "IPA CCM RESPonse with "
+ LOGIPA(conn, LOGL_ERROR, "IPA CCM RESPonse with "
"malformed TLVs\n");
goto err;
}
if (!TLVP_PRESENT(&tlvp, IPAC_IDTAG_UNIT)) {
- LOGP(DLINP, LOGL_ERROR, "IPA CCM RESP without "
+ LOGIPA(conn, LOGL_ERROR, "IPA CCM RESP without "
"unit ID\n");
goto err;
}
len = TLVP_LEN(&tlvp, IPAC_IDTAG_UNIT);
if (len < 1) {
- LOGP(DLINP, LOGL_ERROR, "IPA CCM RESP with short"
+ LOGIPA(conn, LOGL_ERROR, "IPA CCM RESP with short"
"unit ID\n");
goto err;
}
@@ -489,7 +487,7 @@ int ipa_server_conn_ccm(struct ipa_server_conn *conn, struct msgb *msg)
goto err;
break;
default:
- LOGP(DLINP, LOGL_ERROR, "Unknown IPA message type\n");
+ LOGIPA(conn, LOGL_ERROR, "Unknown IPA message type\n");
break;
}
return 0;
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 63ee167..9a80d8e 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -6,6 +6,8 @@
*
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -192,7 +194,11 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
newbfd = &ts->driver.ipaccess.fd;
/* get rid of our old temporary bfd */
- memcpy(newbfd, bfd, sizeof(*newbfd));
+ memcpy(&newbfd->list, &bfd->list, sizeof(newbfd->list));
+ newbfd->fd = bfd->fd;
+ newbfd->when |= bfd->when; /* preserve 'newbfd->when' flags potentially set by sign_link_up() */
+ newbfd->cb = bfd->cb;
+ newbfd->data = bfd->data;
newbfd->priv_nr = E1INP_SIGN_RSL + unit_data.trx_id;
osmo_fd_unregister(bfd);
bfd->fd = -1;
@@ -569,7 +575,7 @@ err_line:
#define IPA_STRING_MAX 64
static struct msgb *
-ipa_bts_id_resp(struct ipaccess_unit *dev, uint8_t *data, int len, int trx_nr)
+ipa_bts_id_resp(const struct ipaccess_unit *dev, uint8_t *data, int len, int trx_nr)
{
struct msgb *nmsg;
char str[IPA_STRING_MAX];
@@ -702,7 +708,8 @@ int ipaccess_bts_handle_ccm(struct ipa_client_conn *link,
if (link->ofd->priv_nr >= E1INP_SIGN_RSL)
trx_nr = link->ofd->priv_nr - E1INP_SIGN_RSL;
- LOGP(DLINP, LOGL_NOTICE, "received ID get\n");
+ LOGP(DLINP, LOGL_NOTICE, "received ID get from %u/%u/%u\n",
+ dev->site_id, dev->bts_id, dev->trx_id);
rmsg = ipa_bts_id_resp(dev, data + 1, len - 1, trx_nr);
ret = ipa_send(link->ofd->fd, rmsg->data, rmsg->len);
if (ret != rmsg->len) {
diff --git a/src/input/lapd.c b/src/input/lapd.c
index 4b5077b..a72a19b 100644
--- a/src/input/lapd.c
+++ b/src/input/lapd.c
@@ -8,6 +8,8 @@
*
* All Rights Reserved
*
+ * SPDX-License-Identifier: GPL-2.0+
+
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
diff --git a/src/input/lapd_pcap.c b/src/input/lapd_pcap.c
index 7374694..77d4971 100644
--- a/src/input/lapd_pcap.c
+++ b/src/input/lapd_pcap.c
@@ -5,6 +5,8 @@
* Author: Harald Welte <laforge@gnumonks.org>
* Pablo Neira Ayuso <pablo@gnumonks.org>
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
diff --git a/src/input/misdn.c b/src/input/misdn.c
index 347b7bf..bdca9d5 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -5,6 +5,8 @@
*
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
diff --git a/src/input/rs232.c b/src/input/rs232.c
index 9da01a3..c801ab2 100644
--- a/src/input/rs232.c
+++ b/src/input/rs232.c
@@ -7,6 +7,8 @@
* Authors: Harald Welte <laforge@gnumonks.org>
* Pablo Neira Ayuso <pablo@gnumonks.org>
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c
index 63bd796..c49928d 100644
--- a/src/input/unixsocket.c
+++ b/src/input/unixsocket.c
@@ -1,12 +1,13 @@
/* OpenBSC Abis receive lapd over a unix socket */
-/* (C) 2016 by sysmocom s.f.m.c. GmbH
- *
+/* (C) 2016 by sysmocom - s.f.m.c. GmbH
* Author: Alexander Couzens <lynxis@fe80.eu>
* Based on other e1_input drivers.
*
* All Rights Reserved
*
+ * SPDX-License-Identifier: GPL-2.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -232,7 +233,7 @@ static int unixsocket_line_update(struct e1inp_line *line)
int i;
if (line->sock_path)
- strcpy(sock_path, line->sock_path);
+ osmo_strlcpy(sock_path, line->sock_path, PATH_MAX);
else
sprintf(sock_path, "%s%d", UNIXSOCKET_SOCK_PATH_DEFAULT,
line->num);
diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c
index 6053bb8..94f48dc 100644
--- a/src/ipa_proxy.c
+++ b/src/ipa_proxy.c
@@ -652,7 +652,6 @@ void ipa_proxy_vty_init(void)
install_element(CONFIG_NODE, &ipa_cfg_cmd);
install_node(&ipa_node, ipa_cfg_write);
- vty_install_default(L_IPA_NODE);
install_element(L_IPA_NODE, &ipa_instance_cfg_add_cmd);
install_element(L_IPA_NODE, &ipa_route_cfg_add_cmd);
}
diff --git a/src/subchan_demux.c b/src/subchan_demux.c
index 238056c..d15c4b8 100644
--- a/src/subchan_demux.c
+++ b/src/subchan_demux.c
@@ -3,6 +3,8 @@
/* (C) 2009 by Harald Welte <laforge@gnumonks.org>
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index c49a23d..8ea05e4 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -2,6 +2,8 @@
* (C) 2011 by On-Waves e.h.f
* All Rights Reserved
*
+ * SPDX-License-Identifier: GPL-2.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -653,3 +655,10 @@ void osmo_rtp_socket_stats(struct osmo_rtp_socket *rs,
if (jitter)
*last_jitter = jitter->jitter;
}
+
+void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname,
+ const char *name, const char *email, const char *phone,
+ const char *loc, const char *tool, const char *note)
+{
+ rtp_session_set_source_description(rs->sess, cname, name, email, phone, loc, tool, note);
+}
diff --git a/src/trau_frame.c b/src/trau_frame.c
index 2f5a003..717bc32 100644
--- a/src/trau_frame.c
+++ b/src/trau_frame.c
@@ -3,6 +3,8 @@
/* (C) 2009 by Harald Welte <laforge@gnumonks.org>
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
diff --git a/tests/e1inp_ipa_bsc_test.c b/tests/e1inp_ipa_bsc_test.c
index b2fb11c..9064d0a 100644
--- a/tests/e1inp_ipa_bsc_test.c
+++ b/tests/e1inp_ipa_bsc_test.c
@@ -213,8 +213,8 @@ int main(void)
{
tall_test = talloc_named_const(NULL, 1, "e1inp_test");
libosmo_abis_init(tall_test);
-
- osmo_init_logging(&bsc_test_log_info);
+ msgb_talloc_ctx_init(tall_test, 0);
+ osmo_init_logging2(tall_test, &bsc_test_log_info);
struct e1inp_line_ops ops = {
.cfg = {
diff --git a/tests/e1inp_ipa_bts_test.c b/tests/e1inp_ipa_bts_test.c
index 28e07ab..48a5c59 100644
--- a/tests/e1inp_ipa_bts_test.c
+++ b/tests/e1inp_ipa_bts_test.c
@@ -265,8 +265,8 @@ int main(void)
tall_test = talloc_named_const(NULL, 1, "e1inp_test");
libosmo_abis_init(tall_test);
-
- osmo_init_logging(&bts_test_log_info);
+ msgb_talloc_ctx_init(tall_test, 0);
+ osmo_init_logging2(tall_test, &bts_test_log_info);
struct e1inp_line_ops ops = {
.cfg = {
diff --git a/tests/ipa_proxy_test.c b/tests/ipa_proxy_test.c
index 8f4533c..da99f01 100644
--- a/tests/ipa_proxy_test.c
+++ b/tests/ipa_proxy_test.c
@@ -39,8 +39,8 @@ int main(void)
{
tall_test = talloc_named_const(NULL, 1, "ipa proxy test");
libosmo_abis_init(tall_test);
-
- osmo_init_logging(&ipa_proxy_test_log_info);
+ msgb_talloc_ctx_init(tall_test, 0);
+ osmo_init_logging2(tall_test, &ipa_proxy_test_log_info);
vty_init(&vty_info);
ipa_proxy_vty_init();
diff --git a/tests/ipa_recv/ipa_recv_test.c b/tests/ipa_recv/ipa_recv_test.c
index 0f56926..07a7ad7 100644
--- a/tests/ipa_recv/ipa_recv_test.c
+++ b/tests/ipa_recv/ipa_recv_test.c
@@ -2,10 +2,12 @@
/*
* (C) 2014 by On-Waves
- * (C) 2014 by sysmocom s.f.m.c. GmbH
+ * (C) 2014 by sysmocom - s.f.m.c. GmbH
*
* All Rights Reserved
*
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -232,7 +234,9 @@ static struct log_info info = {};
int main(int argc, char **argv)
{
- osmo_init_logging(&info);
+ void *tall_ctx = talloc_named_const(NULL, 1, "Root context");
+ msgb_talloc_ctx_init(tall_ctx, 0);
+ osmo_init_logging2(tall_ctx, &info);
log_set_all_filter(osmo_stderr_target, 1);
log_set_log_level(osmo_stderr_target, LOGL_INFO);