policy: fix logging address for reverse-lookup in hostname4_thread_new()

This commit is contained in:
Jiří Klimeš 2012-12-17 19:45:37 +01:00
parent 1b84012762
commit cfb391952d

View file

@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2004 - 2011 Red Hat, Inc.
* Copyright (C) 2004 - 2012 Red Hat, Inc.
* Copyright (C) 2007 - 2008 Novell, Inc.
*/
@ -139,7 +139,6 @@ hostname4_thread_new (guint32 ip4_addr,
gpointer user_data)
{
HostnameThread *ht;
struct sockaddr_in addr4;
char buf[INET_ADDRSTRLEN + 1];
ht = g_malloc0 (sizeof (HostnameThread));
@ -160,7 +159,7 @@ hostname4_thread_new (guint32 ip4_addr,
return NULL;
}
if (!inet_ntop (AF_INET, &addr4.sin_addr, buf, sizeof (buf)))
if (!inet_ntop (AF_INET, &ht->addr4.sin_addr, buf, sizeof (buf)))
strcpy (buf, "(unknown)");
nm_log_dbg (LOGD_DNS, "(%p) started IPv4 reverse-lookup thread for address '%s'",