memcached plugin: Pass `ai_hints' to `getaddrinfo'.
[collectd.git] / src / memcached.c
index b5a4b20..2d999ce 100644 (file)
@@ -1,7 +1,8 @@
 /**
  * collectd - src/memcached.c, based on src/hddtemp.c
- * Copyright (C) 2007  Antony Dovgal
- * Copyright (C) 2005,2006  Vincent StehlĂ©
+ * Copyright (C) 2007       Antony Dovgal
+ * Copyright (C) 2007-2009  Florian Forster
+ * Copyright (C) 2009       Doug MacEachern
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -19,8 +20,8 @@
  *
  * Authors:
  *   Antony Dovgal <tony at daylessday dot org>
- *   Vincent StehlĂ© <vincent.stehle at free.fr>
  *   Florian octo Forster <octo at verplant.org>
+ *   Doug MacEachern <dougm at hyperic.com>
  **/
 
 #include "collectd.h"
@@ -81,7 +82,7 @@ static int memcached_query_daemon (char *buffer, int buffer_size) /* {{{ */
                port = MEMCACHED_DEF_PORT;
        }
 
-       if ((ai_return = getaddrinfo (host, port, NULL, &ai_list)) != 0) {
+       if ((ai_return = getaddrinfo (host, port, &ai_hints, &ai_list)) != 0) {
                char errbuf[1024];
                ERROR ("memcached: getaddrinfo (%s, %s): %s",
                                host, port,