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;
}
ret = sscanf(str_uri, "%5[^:]://", net);
if (ret < 1) {
- printf("bad protocol\n");
+ ERR("URI parse bad protocol %s", str_uri);
goto error;
}
proto = validate_protocol(net);
if (proto == NULL) {
- printf("no protocol\n");
+ ERR("URI parse unknown protocol %s", net);
ret = -1;
goto error;
}