summaryrefslogtreecommitdiffstats
path: root/src/vty/telnet_interface.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2011-05-23 19:01:34 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2011-05-23 19:01:34 +0200
commit3056d012d3d5da853535488619f12beeea59a6a4 (patch)
tree4b5a511154e0241b9ca4724534995d443d9baac3 /src/vty/telnet_interface.c
parentdd93bf46ed0c3c75c1e330db2197703c0b6f8cda (diff)
parentf7a1bcce0cea50650517e305d59e674475f913d0 (diff)
Merge branch 'master' of git.osmocom.org:libosmocore
Diffstat (limited to 'src/vty/telnet_interface.c')
-rw-r--r--src/vty/telnet_interface.c12
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));