diff options
author | Andreas.Eversberg <jolly@eversberg.eu> | 2010-10-12 09:40:05 +0000 |
---|---|---|
committer | Andreas.Eversberg <jolly@eversberg.eu> | 2010-10-12 09:40:05 +0000 |
commit | 651698abca3bb7ec6e405e60e308d8a73b63b4f3 (patch) | |
tree | 5beaa96077a59e3e09443952eb7cecfc92585492 /src/host/layer23/src/mobile/vty_interface.c | |
parent | 2a5e0f3cb7a4713e0aedb4c75878765978ebce02 (diff) |
[layer23] Call control is disabled when mobile is set to SDCCH only
On SDCCH only mobiles, incomming calls must be rejected by a minimal call
control implementation, even if basic calls are not supported.
Diffstat (limited to 'src/host/layer23/src/mobile/vty_interface.c')
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index e3d34fe0..affbe15c 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -629,11 +629,19 @@ DEFUN(call, call_cmd, "call MS_NAME (NUMBER|emergency|answer|hangup|hold)", "Hold current active call\n") { struct osmocom_ms *ms; + struct gsm_settings *set; int i; ms = get_ms(argv[0], vty); if (!ms) return CMD_WARNING; + set = &ms->settings; + + if (set->ch_cap == GSM_CAP_SDCCH) { + vty_out(vty, "Basic call is not supported for SDCCH only " + "mobile%s", VTY_NEWLINE); + return CMD_WARNING; + } if (!strcmp(argv[1], "emergency")) mncc_call(ms, (char *)argv[1]); @@ -1491,6 +1499,10 @@ DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, "channel-capability " return CMD_WARNING; } + if (ch_cap != set->ch_cap + && (ch_cap == GSM_CAP_SDCCH || set->ch_cap == GSM_CAP_SDCCH)) + vty_restart(vty); + set->ch_cap = ch_cap; return CMD_SUCCESS; |