summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-07-07 16:19:21 +0200
committerPablo Neira Ayuso2011-07-07 16:19:21 +0200
commit9621b41cf6ee710885215d8e317e37705a5d6b9f (patch)
tree7805239166e46fd994d93bd3b0ff4afb9053d31a
parentinclude: remove IPA_NODE and E1INP_NODE definition from internal.h (diff)
downloadlibosmo-abis-9621b41cf6ee710885215d8e317e37705a5d6b9f.tar.gz
libosmo-abis-9621b41cf6ee710885215d8e317e37705a5d6b9f.tar.xz
libosmo-abis-9621b41cf6ee710885215d8e317e37705a5d6b9f.zip
ipaccess: don't forget to release temporary RSL socket
We have to release the temporary RSL in case that the socket is closed and we have no chance to attach it to the OML link.
-rw-r--r--src/input/ipaccess.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index cb901ee..a024054 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -236,8 +236,12 @@ static void ipaccess_drop(struct osmo_fd *bfd)
line->ops->sign_link_down(line);
/* RSL connection without ID_RESP, release temporary socket. */
- if (line->ts[E1INP_SIGN_OML-1].type == E1INP_SIGN_NONE)
+ if (line->ts[E1INP_SIGN_OML-1].type == E1INP_SIGN_NONE) {
+ osmo_fd_unregister(bfd);
+ close(bfd->fd);
+ bfd->fd = -1;
talloc_free(bfd);
+ }
}
static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,