Skip to contentSkip to conversation

qemu-char.c: fix waiting for telnet connection message

PATCH In review Igor Mitsyanko 2 participants 2 messages Mar 10, 2013 – Mar 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-char.c: fix waiting for telnet connection message

Current colon position in "waiting for telnet connection" message template produces messages like:
QEMU waiting for connection on: telnet::127.0.0.16666,server

After moving a colon to the right, we will get a correct messages like:
QEMU waiting for connection on: telnet:127.0.0.1:6666,server

---
 qemu-char.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu-char.c +1 -1
index 36295b1..789ee35 100644
@@ -2476,7 +2476,7 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool do_nodelay,
         s->do_nodelay = do_nodelay;
         getnameinfo((struct sockaddr *) &ss, ss_len, host, sizeof(host),
                     serv, sizeof(serv), NI_NUMERICHOST | NI_NUMERICSERV);
-        snprintf(chr->filename, 256, "%s:%s:%s%s%s%s",
+        snprintf(chr->filename, 256, "%s:%s%s%s:%s%s",
                  is_telnet ? "telnet" : "tcp",
                  left, host, right, serv,
                  is_listen ? ",server" : "");
Signature · 1 line
1.7.5.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Igor Mitsyanko

Current colon position in "waiting for telnet connection" message template produces messages like:
QEMU waiting for connection on: telnet::127.0.0.16666,server

After moving a colon to the right, we will get a correct messages like:
QEMU waiting for connection on: telnet:127.0.0.1:6666,server

---
 qemu-char.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu-char.c +0 -0
index 36295b1..789ee35 100644

qemu-char.c static CharDriverState *qemu_chr_open_socket_fd(int fd, bool do_nodelay, · line 2482

Quoted 8 lines
qemu-char.c +1 -1
@@ -2476,7 +2476,7 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool do_nodelay,
         s->do_nodelay = do_nodelay;
         getnameinfo((struct sockaddr *) &ss, ss_len, host, sizeof(host),
                     serv, sizeof(serv), NI_NUMERICHOST | NI_NUMERICSERV);
-        snprintf(chr->filename, 256, "%s:%s:%s%s%s%s",
+        snprintf(chr->filename, 256, "%s:%s%s%s:%s%s",
                  is_telnet ? "telnet" : "tcp",
                  left, host, right, serv,
                  is_listen ? ",server" : "");

Broken in commit f6bd5d6e. Nice to have that information in the commit message, but not worth a respin.