Browse code

clamdscan: Avoid using AI_PASSIVE when calling getaddrinfo to connect to clamd.

Mark Pizzolato authored on 2014/11/27 07:58:41
Showing 1 changed files
... ...
@@ -99,10 +99,9 @@ int dconnect() {
99 99
         memset(&hints, 0x00, sizeof(struct addrinfo));
100 100
         hints.ai_family = AF_UNSPEC;
101 101
         hints.ai_socktype = SOCK_STREAM;
102
-        hints.ai_flags = AI_PASSIVE;
103 102
 
104 103
         if ((res = getaddrinfo(ipaddr, port, &hints, &info))) {
105
-            logg("!Could not lookup %s: %s\n", opt->strarg, gai_strerror(res));
104
+            logg("!Could not lookup %s: %s\n", ipaddr ? ipaddr : "", gai_strerror(res));
106 105
             opt = opt->nextarg;
107 106
             continue;
108 107
         }