dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-abis/+/32371 )
Change subject: e1d: set fd number back to 0 on failure
......................................................................
e1d: set fd number back to 0 on failure
When osmo_e1dp_client_ts_open fails to return a valid file descriptor,
let's set bfd->fd back to 0. This will not change the current behavior
but leaves bfd->fd in a clean state.
Change-Id: Ic49e93550f0cff1a30644408ef7dc0648be768df
---
M src/input/e1d.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/71/32371/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index b91d02e..ba7791f 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -444,6 +444,7 @@
if (bfd->fd < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Could not open timeslot %d\n", ts);
talloc_free(ts_info);
+ bfd->fd = 0;
return -EIO;
}
bfd->when = OSMO_FD_READ;
@@ -474,6 +475,7 @@
if (bfd->fd < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Could not open timeslot %d\n", ts);
talloc_free(ts_info);
+ bfd->fd = 0;
return -EIO;
}
bfd->when = OSMO_FD_READ;
@@ -498,6 +500,7 @@
if (bfd->fd < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Could not open timeslot %d\n", ts);
talloc_free(ts_info);
+ bfd->fd = 0;
return -EIO;
}
bfd->when = OSMO_FD_READ;
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-abis/+/32371
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic49e93550f0cff1a30644408ef7dc0648be768df
Gerrit-Change-Number: 32371
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange