fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-msc/+/40877?usp=email )
Change subject: silent_call: check if subscriber has a connection
......................................................................
silent_call: check if subscriber has a connection
It makes no sense to initiate a silent call if subscriber already
has an active connection (e.g. when a normal call is ongoing).
Change-Id: I52b3be26c61cadacc4783b5c324809ecd6906b36
---
M src/libmsc/msc_vty.c
M src/libmsc/silent_call.c
2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/40877/1
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 41cb0d4..07791f1 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -1596,6 +1596,9 @@
case -ENODEV:
vty_out(vty, "%% Subscriber not attached%s", VTY_NEWLINE);
break;
+ case -EBUSY:
+ vty_out(vty, "%% Subscriber has an active connection%s", VTY_NEWLINE);
+ break;
default:
if (rc)
vty_out(vty, "%% Cannot start silent call (rc=%d)%s", rc, VTY_NEWLINE);
diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c
index 9c0d2b6..327ed7f 100644
--- a/src/libmsc/silent_call.c
+++ b/src/libmsc/silent_call.c
@@ -142,6 +142,9 @@
struct gsm_network *net = vsub->vlr->user_ctx;
struct gsm_trans *trans;
+ if (msc_a_for_vsub(vsub, true) != NULL)
+ return -EBUSY;
+
trans = trans_alloc(net, vsub, TRANS_SILENT_CALL, 0, 0);
if (trans == NULL)
return -ENODEV;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-msc/+/40877?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I52b3be26c61cadacc4783b5c324809ecd6906b36
Gerrit-Change-Number: 40877
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>