VTY (silent sms / sms): better error reporting

This commit is contained in:
Harald Welte 2009-11-14 10:11:45 +01:00
parent bbe3172996
commit 81cf1980ea
1 changed files with 9 additions and 4 deletions

View File

@ -230,9 +230,11 @@ DEFUN(subscriber_send_sms,
struct buffer *b;
int rc;
if (!subscr)
if (!subscr) {
vty_out(vty, "%% No subscriber found for %s %s%s",
argv[0], argv[1], VTY_NEWLINE);
return CMD_WARNING;
}
b = argv_to_buffer(argc, argv, 2);
rc = _send_sms_buffer(subscr, b, 0);
buffer_free(b);
@ -251,8 +253,11 @@ DEFUN(subscriber_silent_sms,
struct buffer *b;
int rc;
if (!subscr)
if (!subscr) {
vty_out(vty, "%% No subscriber found for %s %s%s",
argv[0], argv[1], VTY_NEWLINE);
return CMD_WARNING;
}
b = argv_to_buffer(argc, argv, 2);
rc = _send_sms_buffer(subscr, b, 64);
@ -273,7 +278,7 @@ DEFUN(subscriber_silent_call,
if (!subscr) {
vty_out(vty, "%% No subscriber found for %s %s%s",
argv[0], argv[1]);
argv[0], argv[1], VTY_NEWLINE);
return CMD_WARNING;
}