aboutsummaryrefslogtreecommitdiffstats
path: root/src/links.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-02 20:24:08 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-17 11:21:11 +0100
commitc8405692b381e4079eeaf52f38610a6a24f64773 (patch)
tree1e60aff422dfe1dd703f2b0eecb7230e401faa1d /src/links.c
parent569f1e171df2f055d0be5fc637e050a523a9ae8a (diff)
mtp: Propagate link and linkset failures in two stages
Handle a single link failure in links.c and if all the links have failed propagate it up. This is preparing the multiple links support.
Diffstat (limited to 'src/links.c')
-rw-r--r--src/links.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/links.c b/src/links.c
index adc74d1..233f323 100644
--- a/src/links.c
+++ b/src/links.c
@@ -27,6 +27,17 @@
extern struct bsc_data bsc;
+void mtp_link_down(struct link_data *link)
+{
+ mtp_linkset_down(link->the_link);
+ link->clear_queue(link);
+}
+
+void mtp_link_up(struct link_data *link)
+{
+ mtp_linkset_up(link->the_link);
+}
+
void mtp_link_set_sccp_down(struct mtp_link_set *link)
{
}
@@ -63,6 +74,7 @@ int link_init(struct bsc_data *bsc)
bsc->link.the_link->sltm_once = bsc->once;
bsc->link.the_link->ni = bsc->ni_ni;
bsc->link.the_link->spare = bsc->ni_spare;
+ bsc->link.the_link->bsc = bsc;
bsc->link.bsc = bsc;
bsc->link.udp.link_index = 1;