[PATCH] libosmo-abis[master]: handle_ts1_read(): log sign_link() error

Max gerrit-no-reply at lists.osmocom.org
Mon Jan 9 12:25:10 UTC 2017


Review at  https://gerrit.osmocom.org/1549

handle_ts1_read(): log sign_link() error

Change-Id: I95779ee8590ab16b7af4ad2c79ede68da3a12e5a
---
M src/input/ipaccess.c
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/49/1549/1

diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 675f07a..9e64471 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -228,7 +228,7 @@
 	struct e1inp_sign_link *link;
 	struct ipaccess_head *hh;
 	struct msgb *msg = NULL;
-	int ret;
+	int ret, rc;
 
 	ret = ipa_msg_recv_buffered(bfd->fd, &msg, &e1i_ts->pending_msg);
 	if (ret < 0) {
@@ -273,13 +273,14 @@
 		ret = -EINVAL;
 		goto err_msg;
 	}
-	if (e1i_ts->line->ops->sign_link(msg) < 0) {
+	rc = e1i_ts->line->ops->sign_link(msg);
+	if (rc < 0) {
 		/* Don't close the signalling link if the upper layers report
 		 * an error, that's too strict. BTW, the signalling layer is
 		 * resposible for releasing the message.
 		 */
 		LOGP(DLINP, LOGL_ERROR, "Bad signalling message,"
-			"sign_link returned error\n");
+		     " sign_link returned error: %s.\n", strerror(-rc));
 	}
 
 	return 0;

-- 
To view, visit https://gerrit.osmocom.org/1549
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95779ee8590ab16b7af4ad2c79ede68da3a12e5a
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>


More information about the gerrit-log mailing list