cbch: Don't send cell-broadcast command on BTS without CBCH channel

Change-Id: I83d6b0b3eafd83e2c0fbdec81d9677ff0118db92
This commit is contained in:
Harald Welte 2018-09-09 14:50:59 +02:00
parent 5ac4d800e5
commit 0bc5365241
1 changed files with 4 additions and 0 deletions

View File

@ -4240,6 +4240,10 @@ DEFUN(smscb_cmd, smscb_cmd_cmd,
vty_out(vty, "%% No such BTS (%d)%s", bts_nr, VTY_NEWLINE);
return CMD_WARNING;
}
if (!gsm_bts_get_cbch(bts)) {
vty_out(vty, "%% BTS %d doesn't have a CBCH%s", bts_nr, VTY_NEWLINE);
return CMD_WARNING;
}
rc = osmo_hexparse(argv[2], buf, sizeof(buf));
if (rc < 0 || rc > sizeof(buf)) {
vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE);