aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-11-25 17:21:44 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-11-25 17:21:44 +0100
commit1459c08cc589264a1cef5ac845a2a36afdbf3c49 (patch)
treef8e0966fe65d664ddb304f38ec81848964a9c071
parent559ecb75df253879c34f4bbd6eeb47646e4429b5 (diff)
msc: Only take down the link if it is up
If the link was never started and we send a SIGUSR2 we would start the link. Don't do it.
-rw-r--r--src/bsc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bsc.c b/src/bsc.c
index 98c2e8d..eee2d65 100644
--- a/src/bsc.c
+++ b/src/bsc.c
@@ -118,8 +118,10 @@ static void sigusr2()
struct msc_connection *msc;
printf("Closing the MSC connection on demand.\n");
- llist_for_each_entry(msc, &bsc->mscs, entry)
- msc_close_connection(msc);
+ llist_for_each_entry(msc, &bsc->mscs, entry) {
+ if (!msc->msc_link_down)
+ msc_close_connection(msc);
+ }
}