From cf5d433239d042b4009ff8d9a5aa6ed42724c53a Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Tue, 7 Jan 2014 14:16:03 -0500 Subject: [PATCH] Fix: lttng-live should accept 0 in addresses Fixes #708 Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- formats/lttng-live/lttng-live.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formats/lttng-live/lttng-live.c b/formats/lttng-live/lttng-live.c index 44f7d596..8f734f7b 100644 --- a/formats/lttng-live/lttng-live.c +++ b/formats/lttng-live/lttng-live.c @@ -55,7 +55,7 @@ static int parse_url(const char *path, char *hostname, int *port, } /* TODO : parse for IPv6 as well */ /* Parse the hostname or IP */ - ret = sscanf(path + proto_offset, "%[a-zA-Z.1-9%-]%s", + ret = sscanf(path + proto_offset, "%[a-zA-Z.0-9%-]%s", hostname, remain); if (ret == 2) { /* Optional port number */ -- 2.34.1