From 81cf1980ea669e3661b45a9f1deb4db8f82b065b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 14 Nov 2009 10:11:45 +0100 Subject: [PATCH] VTY (silent sms / sms): better error reporting --- openbsc/src/vty_interface_layer3.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c index fe5b667f..fe107030 100644 --- a/openbsc/src/vty_interface_layer3.c +++ b/openbsc/src/vty_interface_layer3.c @@ -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; }