aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-08-28 18:25:02 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-08-28 18:25:02 +0200
commited122f3c25070252c44819767adf67bf3b006260 (patch)
treee028f51d1dd37bd5a41dd6ebf7d155ea9cceb43f
parent7ad2b15bc767f471ae12d4d72b5c734bde163d2a (diff)
ipaccess: Allow passing return code in e1inp_line_ops->sign_link()
-rw-r--r--include/osmocom/abis/e1_input.h1
-rw-r--r--src/input/ipaccess.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 3fbce5b..79455e1 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -173,6 +173,7 @@ struct e1inp_line_ops {
struct e1inp_sign_link * (*sign_link_up)(void *unit_info, struct e1inp_line *line, enum e1inp_sign_type type);
void (*sign_link_down)(struct e1inp_line *line);
+ /* Called when a new message arrives. -EBADF must be returned if the osmo_fd in link (msg->dst) is destroyed. */
int (*sign_link)(struct msgb *msg);
};
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 24a79ea..566fd64 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -279,7 +279,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
" sign_link returned error: %s.\n", strerror(-rc));
}
- return 0;
+ return rc;
err_msg:
msgb_free(msg);
err:
@@ -790,8 +790,7 @@ static int ipaccess_bts_read_cb(struct ipa_client_conn *link, struct msgb *msg)
"no action set for signalling messages.\n");
goto err;
}
- link->line->ops->sign_link(msg);
- return 0;
+ return link->line->ops->sign_link(msg);
err:
ipa_client_conn_close(link);