From 9621b41cf6ee710885215d8e317e37705a5d6b9f Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 7 Jul 2011 16:19:21 +0200 Subject: 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. --- src/input/ipaccess.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/input/ipaccess.c') 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, -- cgit v1.2.3-55-g7522