summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Alteholz <debian@alteholz.de>2018-05-16 18:27:01 +0200
committerThorsten Alteholz <debian@alteholz.de>2018-05-16 19:50:10 +0200
commitcb17fcff69460f466ca133d229d7bf9ea317cbce (patch)
treeb02f0c4fe1c2d146a19ec77b0080ce5150734232
parent4a119c40ee808fe7d751f454bfaa17600ae4d63e (diff)
parent20e9fa8a9b9ec0ea270127141019363e935f4d39 (diff)
Import Debian changes 0.5.0-1
libosmo-abis (0.5.0-1) experimental; urgency=medium * New upstream release * debian/control: really add salsa URLs now
-rw-r--r--configure.ac40
-rwxr-xr-xcontrib/jenkins.sh11
-rw-r--r--debian/changelog7
-rw-r--r--debian/control6
-rw-r--r--debian/libosmotrau2.symbols1
-rw-r--r--debian/patches/spelling.patch8
-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
29 files changed, 142 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 4ce5223..a73cf5b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libosmo-abis (0.5.0-1) experimental; urgency=medium
+
+ * New upstream release
+ * debian/control: really add salsa URLs now
+
+ -- Thorsten Alteholz <debian@alteholz.de> Wed, 16 May 2018 18:27:01 +0200
+
libosmo-abis (0.4.0-2) unstable; urgency=medium
* move to unstable
diff --git a/debian/control b/debian/control
index 4f47e37..a8a72d2 100644
--- a/debian/control
+++ b/debian/control
@@ -6,13 +6,13 @@ Section: libs
Priority: optional
Build-Depends: debhelper (>= 11),
libdpkg-perl,
- libosmocore-dev (>= 0.9.1),
+ libosmocore-dev (>= 0.11.0),
libtalloc-dev,
pkg-config,
libortp-dev
Standards-Version: 4.1.4
-Vcs-Browser: https://anonscm.debian.org/cgit/debian-mobcom/libosmo-abis.git
-Vcs-Git: https://anonscm.debian.org/git/debian-mobcom/libosmo-abis.git
+Vcs-Browser: https://salsa.debian.org/debian-mobcom-team/libosmo-abis
+Vcs-Git: https://salsa.debian.org/debian-mobcom-team/libosmo-abis.git
Homepage: http://openbsc.osmocom.org/trac/wiki/libosmo-abis
Package: libosmoabis6
diff --git a/debian/libosmotrau2.symbols b/debian/libosmotrau2.symbols
index 8fce9ea..63ad368 100644
--- a/debian/libosmotrau2.symbols
+++ b/debian/libosmotrau2.symbols
@@ -4,6 +4,7 @@ libosmotrau.so.2 libosmotrau2 #MINVER#
osmo_rtp_init@Base 0.4.0
osmo_rtp_send_frame@Base 0.4.0
osmo_rtp_send_frame_ext@Base 0.4.0
+ osmo_rtp_set_source_desc@Base 0.5.0
osmo_rtp_skipped_frame@Base 0.4.0
osmo_rtp_socket_bind@Base 0.4.0
osmo_rtp_socket_connect@Base 0.4.0
diff --git a/debian/patches/spelling.patch b/debian/patches/spelling.patch
index a123a1c..d6e6f17 100644
--- a/debian/patches/spelling.patch
+++ b/debian/patches/spelling.patch
@@ -1,10 +1,10 @@
Description: fix spelling that was detected by lintian
Author: Thorsten Alteholz <debian@alteholz.de>
-Index: libosmo-abis-0.4.0/src/input/ipa.c
+Index: libosmo-abis-0.5.0/src/input/ipa.c
===================================================================
---- libosmo-abis-0.4.0.orig/src/input/ipa.c 2017-08-25 16:12:37.000000000 +0200
-+++ libosmo-abis-0.4.0/src/input/ipa.c 2017-11-28 15:29:11.274860753 +0100
-@@ -265,7 +265,7 @@
+--- libosmo-abis-0.5.0.orig/src/input/ipa.c 2018-05-16 16:54:24.844491097 +0200
++++ libosmo-abis-0.5.0/src/input/ipa.c 2018-05-16 16:54:24.808491097 +0200
+@@ -267,7 +267,7 @@
ret = link->accept_cb(link, fd);
if (ret < 0) {
LOGP(DLINP, LOGL_ERROR,
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);