aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-08-28 17:53:38 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-08-28 18:08:59 +0200
commit082876bb65341d05263829664d3de0aa8dd4a874 (patch)
treecfc34dc361c1d975d5f736ff7f52fd9e7417ee9d /include/osmocom
parent2775798edb2ea72dbe683cf61700b61426e67bf5 (diff)
ipa: Allow signalling fd destroyed in ipa_server_conn_read
Similar to what we do in other osmo_fd cb, check for read_cb returning -EBADF and in that case don't attempt using the osmo_fd anymore, either because the fd was already closed (no need to then signal WRITE) or because osmo_fd struct itself has been freed. Change-Id: I4b968b72285f23a9552519cea67398a43d5003d2
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/abis/ipa.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h
index 4359268..a738156 100644
--- a/include/osmocom/abis/ipa.h
+++ b/include/osmocom/abis/ipa.h
@@ -37,6 +37,7 @@ struct ipa_server_conn {
int (*closed_cb)(struct ipa_server_conn *peer);
int (*ccm_cb)(struct ipa_server_conn *peer, struct msgb *msg,
struct tlv_parsed *tlvp, struct ipaccess_unit *ud);
+ /* Callback when ofd has something to be read. -EBADF must be returned if the osmo_fd is destroyed. */
int (*cb)(struct ipa_server_conn *peer, struct msgb *msg);
void *data;
struct msgb *pending_msg;