diff options
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/hsl.c | 12 | ||||
-rw-r--r-- | src/input/ipaccess.c | 5 |
2 files changed, 4 insertions, 13 deletions
diff --git a/src/input/hsl.c b/src/input/hsl.c index 408228e4..3dcba1d5 100644 --- a/src/input/hsl.c +++ b/src/input/hsl.c @@ -307,15 +307,9 @@ static int hsl_fd_cb(struct osmo_fd *bfd, unsigned int what) static void hsl_close(struct e1inp_sign_link *sign_link) { - struct e1inp_ts *ts = sign_link->ts; - struct osmo_fd *bfd = &ts->driver.ipaccess.fd; - e1inp_event(ts, S_L_INP_TEI_DN, sign_link->tei, sign_link->sapi); - /* the first e1inp_sign_link_destroy call closes the socket. */ - if (bfd->fd != -1) { - osmo_fd_unregister(bfd); - close(bfd->fd); - bfd->fd = -1; - } + struct e1inp_ts *e1i_ts = sign_link->ts; + struct osmo_fd *bfd = &e1i_ts->driver.ipaccess.fd; + return e1inp_close_socket(e1i_ts, sign_link, bfd); } static int hsl_line_update(struct e1inp_line *line); diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 26212908..6ae9ab30 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -464,10 +464,7 @@ static void ipaccess_close(struct e1inp_sign_link *sign_link) { struct e1inp_ts *e1i_ts = sign_link->ts; struct osmo_fd *bfd = &e1i_ts->driver.ipaccess.fd; - e1inp_event(e1i_ts, S_L_INP_TEI_DN, sign_link->tei, sign_link->sapi); - osmo_fd_unregister(bfd); - close(bfd->fd); - bfd->fd = -1; + return e1inp_close_socket(e1i_ts, sign_link, bfd); } static void timeout_ts1_write(void *data) |