ipaccess: Allow passing return code in e1inp_line_ops->sign_link()
Change-Id: Ia83eead3622d86f55c1dc5e91acc78dde73a0367
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_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 @@
" sign_link returned error: %s.\n", strerror(-rc));
}
- return 0;
+ return rc;
err_msg:
msgb_free(msg);
err:
@@ -790,8 +790,7 @@
"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);