summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-07-05 14:45:46 +0200
committerPablo Neira Ayuso2011-07-05 14:59:16 +0200
commitadd3ec84779ca1f9c7dd64aa8bb8641e8f15637a (patch)
tree939d9efeac7c3d28f184c8d7ded864ec6598f777
parentinclude: export lapd.h since openBSC needs it (diff)
downloadlibosmo-abis-add3ec84779ca1f9c7dd64aa8bb8641e8f15637a.tar.gz
libosmo-abis-add3ec84779ca1f9c7dd64aa8bb8641e8f15637a.tar.xz
libosmo-abis-add3ec84779ca1f9c7dd64aa8bb8641e8f15637a.zip
e1_input: change prototype of close hook in e1inp_driver
This patch changes `close' so we can make the e1inp_event inside this hook.
-rw-r--r--include/osmocom/abis/e1_input.h2
-rw-r--r--src/e1_input.c2
-rw-r--r--src/input/ipaccess.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index f29491a..312e781 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -116,7 +116,7 @@ struct e1inp_driver {
const char *name;
int (*want_write)(struct e1inp_ts *ts);
int (*line_update)(struct e1inp_line *line, enum e1inp_line_role role, const char *addr);
- void (*close)(struct e1inp_ts *ts);
+ void (*close)(struct e1inp_sign_link *link);
int default_delay;
};
diff --git a/src/e1_input.c b/src/e1_input.c
index d11a3ce..77a6b3c 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -429,7 +429,7 @@ void e1inp_sign_link_destroy(struct e1inp_sign_link *link)
osmo_timer_del(&link->ts->sign.tx_timer);
if (link->ts->line->driver->close)
- link->ts->line->driver->close(link->ts);
+ link->ts->line->driver->close(link);
talloc_free(link);
}
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index dc25430..0192b2b 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -417,9 +417,11 @@ static int ts_want_write(struct e1inp_ts *e1i_ts)
return 0;
}
-static void ipaccess_close(struct e1inp_ts *e1i_ts)
+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_INP_TEI_DN, sign_link->tei, sign_link->sapi);
osmo_fd_unregister(bfd);
close(bfd->fd);
bfd->fd = -1;