Fix: some error in uri.c were still using printf()
authorDavid Goulet <dgoulet@efficios.com>
Wed, 25 Jul 2012 14:18:41 +0000 (10:18 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 25 Jul 2012 14:23:36 +0000 (10:23 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/uri.c

index f97b0bba8504b052cb18978f18a1529fefa47c38..6ca46474f06086666b68d22fa1871b51bebfdc9f 100644 (file)
@@ -91,7 +91,7 @@ static int set_ip_address(const char *addr, int af, char *dst, size_t size)
                record = gethostbyname2(addr, af);
                if (record == NULL) {
                        /* At this point, the IP or the hostname is bad */
-                       printf("bad hostname\n");
+                       ERR("URI parse bad hostname %s for af %d", addr, af);
                        goto error;
                }
 
@@ -175,7 +175,7 @@ ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris)
 
        ret = sscanf(str_uri, "%5[^:]://", net);
        if (ret < 1) {
-               printf("bad protocol\n");
+               ERR("URI parse bad protocol %s", str_uri);
                goto error;
        }
 
@@ -183,7 +183,7 @@ ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris)
 
        proto = validate_protocol(net);
        if (proto == NULL) {
-               printf("no protocol\n");
+               ERR("URI parse unknown protocol %s", net);
                ret = -1;
                goto error;
        }
This page took 0.025767 seconds and 4 git commands to generate.