diff options
-rw-r--r-- | src/vty/telnet_interface.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 78459944..c08a256a 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -95,10 +95,16 @@ extern struct host host; static void print_welcome(int fd) { int ret; - static char *msg = - "Welcome to the OpenBSC Control interface\r\n"; + static const char *msg1 = "Welcome to the "; + static const char *msg2 = " control interface\r\n"; + char *app_name = "<unnamed>"; - ret = write(fd, msg, strlen(msg)); + if (host.app_info->name) + app_name = host.app_info->name; + + ret = write(fd, msg1, strlen(msg1)); + ret = write(fd, app_name, strlen(app_name)); + ret = write(fd, msg2, strlen(msg2)); if (host.app_info->copyright) ret = write(fd, host.app_info->copyright, strlen(host.app_info->copyright)); |