Message ID | 4B50CAEA.6070900@web.de |
---|---|
State | New |
Headers | show |
On 01/15/10 21:07, Jan Kiszka wrote: > The missing '@' broke 'udp::<port>@:<port>' parsing. > if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) { > host[0] = 0; > - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) { > + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) { Indeed. > fprintf(stderr, "udp #1\n"); While you are at it, can you also zap this debug leftover? thanks, Gerd
Gerd Hoffmann wrote: > On 01/15/10 21:07, Jan Kiszka wrote: >> The missing '@' broke 'udp::<port>@:<port>' parsing. > >> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) { >> host[0] = 0; >> - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) { >> + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) { > > Indeed. > >> fprintf(stderr, "udp #1\n"); > > While you are at it, can you also zap this debug leftover? Looks like there are three of them in qemu_chr_parse_compat - kill them all? Jan
On 01/18/10 11:21, Jan Kiszka wrote: > Gerd Hoffmann wrote: >> On 01/15/10 21:07, Jan Kiszka wrote: >>> The missing '@' broke 'udp::<port>@:<port>' parsing. >> >>> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) { >>> host[0] = 0; >>> - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) { >>> + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) { >> >> Indeed. >> >>> fprintf(stderr, "udp #1\n"); >> >> While you are at it, can you also zap this debug leftover? > > Looks like there are three of them in qemu_chr_parse_compat - kill them all? Yes. thanks, Gerd
diff --git a/qemu-char.c b/qemu-char.c index b13f8d4..a8a92f5 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2314,7 +2314,7 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename) qemu_opt_set(opts, "backend", "udp"); if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port, &pos) < 2) { host[0] = 0; - if (sscanf(p, ":%32[^,]%n", port, &pos) < 1) { + if (sscanf(p, ":%32[^@,]%n", port, &pos) < 1) { fprintf(stderr, "udp #1\n"); goto fail; }
The missing '@' broke 'udp::<port>@:<port>' parsing. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- qemu-char.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)