VTY (silent sms / sms): better error reporting
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index fe5b667..fe10703 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -230,9 +230,11 @@
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 @@
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 @@
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;
}