aboutsummaryrefslogtreecommitdiffstats
path: root/src/link_udp.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/link_udp.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/link_udp.c')
-rw-r--r--src/link_udp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/link_udp.c b/src/link_udp.c
index e5e476c..3fbc726 100644
--- a/src/link_udp.c
+++ b/src/link_udp.c
@@ -91,12 +91,12 @@ static int udp_read_cb(struct bsc_fd *fd)
if (hdr->data_type == UDP_DATA_RETR_COMPL || hdr->data_type == UDP_DATA_RETR_IMPOS) {
LOGP(DINP, LOGL_ERROR, "Link retrieval done. Restarting the link.\n");
- bsc_link_down(link);
- bsc_link_up(link);
+ mtp_link_down(link);
+ mtp_link_up(link);
goto exit;
} else if (hdr->data_type > UDP_DATA_MSU_PRIO_3) {
LOGP(DINP, LOGL_ERROR, "Link failure. retrieved message.\n");
- bsc_link_down(link);
+ mtp_link_down(link);
goto exit;
}
@@ -132,7 +132,7 @@ static void do_start(void *_data)
link->forced_down = 0;
snmp_mtp_activate(link->udp.session, link->udp.link_index);
- bsc_link_up(link);
+ mtp_link_up(link);
}
static int udp_link_reset(struct link_data *link)
@@ -140,7 +140,7 @@ static int udp_link_reset(struct link_data *link)
LOGP(DINP, LOGL_NOTICE, "Will restart SLTM transmission in %d seconds.\n",
link->udp.reset_timeout);
snmp_mtp_deactivate(link->udp.session, link->udp.link_index);
- bsc_link_down(link);
+ mtp_link_down(link);
/* restart the link in 90 seconds... to force a timeout on the BSC */
link->link_activate.cb = do_start;