summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-12-28 17:05:43 +0100
committerHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-12-28 17:05:43 +0100
commitffc83a9e195eb17594e998006cec23fae569721b (patch)
tree8df9cae29d60cd02a41e631dcaaf3e67ac9ae015
parentfcfc53a33dfbc342cbc4de40308a7ecac905a743 (diff)
rsl_sendmsg: Print message in case trx == NULL
-rw-r--r--openbsc/src/e1_input.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c
index 0a0cc8d7e..c894fe40f 100644
--- a/openbsc/src/e1_input.c
+++ b/openbsc/src/e1_input.c
@@ -234,10 +234,16 @@ int abis_rsl_sendmsg(struct msgb *msg)
msg->l2h = msg->data;
- if (!msg->trx || !msg->trx->rsl_link) {
- LOGP(DRSL, LOGL_ERROR, "rsl_sendmsg: msg->trx == NULL\n");
+ if (!msg->trx) {
+ LOGP(DRSL, LOGL_ERROR, "rsl_sendmsg: msg->trx == NULL: %s\n",
+ hexdump(msg->data, msg->len));
talloc_free(msg);
return -EINVAL;
+ } else if (!msg->trx->rsl_link) {
+ LOGP(DRSL, LOGL_ERROR, "rsl_sendmsg: msg->trx->rsl_link == NULL: %s\n",
+ hexdump(msg->data, msg->len));
+ talloc_free(msg);
+ return -EIO;
}
sign_link = msg->trx->rsl_link;