diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-20 16:51:34 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-20 19:07:16 +0100 |
commit | fa8cf2d9388001b052675a740ac07582b4849b9d (patch) | |
tree | 238e52becc04e5595bbf26af54b5b3be10f1d416 /src/mtp_link.c | |
parent | 9b8a4a7f49b8d926de4bd4a1866d9506b92e1dfa (diff) |
mtp: Create a method for a link failure to restart the link.
Make sure that a failed link will be restarted by calling the
reset method which should take the link down.
Diffstat (limited to 'src/mtp_link.c')
-rw-r--r-- | src/mtp_link.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mtp_link.c b/src/mtp_link.c index 20f4785..5423b33 100644 --- a/src/mtp_link.c +++ b/src/mtp_link.c @@ -78,7 +78,7 @@ static void mtp_sltm_t1_timeout(void *_link) } else { LOGP(DINP, LOGL_ERROR, "Two missing SLTAs. Restart link: %p\n", link); bsc_del_timer(&link->t2_timer); - link->reset(link); + mtp_link_failure(link); } } @@ -148,3 +148,9 @@ int mtp_link_slta(struct mtp_link *link, uint16_t l3_len, return 0; } + +void mtp_link_failure(struct mtp_link *link) +{ + LOGP(DINP, LOGL_ERROR, "Link has failed. Resetting it: 0x%p\n", link); + link->reset(link); +} |