aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-08-28 17:32:29 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-08-28 18:08:59 +0200
commit2775798edb2ea72dbe683cf61700b61426e67bf5 (patch)
tree2aa0c210bfc3a84390b13769094ea76d810a029b /include/osmocom
parent3750dea96852b453029f91d4b3a66912745290d9 (diff)
ipa: Allow signalling fd destroyed in ipa_client_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: I0e449a2bdf7f0411feeccd262cd731ca6fba3fc1
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 a157889..4359268 100644
--- a/include/osmocom/abis/ipa.h
+++ b/include/osmocom/abis/ipa.h
@@ -71,6 +71,7 @@ struct ipa_client_conn {
const char *addr;
uint16_t port;
void (*updown_cb)(struct ipa_client_conn *link, int up);
+ /* Callback when ofd has something to be read. -EBADF must be returned if the osmo_fd is destroyed. */
int (*read_cb)(struct ipa_client_conn *link, struct msgb *msg);
int (*write_cb)(struct ipa_client_conn *link);
void *data;