Use the app_info->name instead of the hostname
authorHarald Welte <laforge@gnumonks.org>
Fri, 24 Dec 2010 14:10:14 +0000 (15:10 +0100)
committerHarald Welte <laforge@gnumonks.org>
Fri, 24 Dec 2010 14:10:14 +0000 (15:10 +0100)
This makes more sense in case you run BCS, SGSN and other components
on the same host.  Having multiple telnet sessions with the same
prompt can otherwise be confusing.

src/vty/vty.c

index 5c5a908..a5b16dc 100644 (file)
@@ -306,7 +306,7 @@ static void vty_prompt(struct vty *vty)
        const char *hostname;
 
        if (vty->type == VTY_TERM) {
-               hostname = host.name;
+               hostname = host.app_info->name;
                if (!hostname) {
                        uname(&names);
                        hostname = names.nodename;