diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-07-20 14:05:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-07-20 14:05:41 +0100 |
commit | 7522608cb80dc227c05f4e254ba13e9f86d7a07f (patch) | |
tree | e836ee6ae17384f5e6dfbe8d5e1f7d1dae43a75b /lib | |
parent | 4f6ae1b0032c19b34f8ff4ade29549c68bf0e051 (diff) | |
download | rspamd-7522608cb80dc227c05f4e254ba13e9f86d7a07f.tar.gz rspamd-7522608cb80dc227c05f4e254ba13e9f86d7a07f.zip |
Remove ipv4 legacy from librspamdclient.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/client/librspamdclient.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/client/librspamdclient.c b/lib/client/librspamdclient.c index 30410f503..b99e1c2f9 100644 --- a/lib/client/librspamdclient.c +++ b/lib/client/librspamdclient.c @@ -42,7 +42,6 @@ struct rspamd_server { struct upstream up; - struct in_addr addr; guint16 client_port; guint16 controller_port; gchar *name; @@ -1175,7 +1174,6 @@ rspamd_add_server (struct rspamd_client *client, const gchar *host, guint16 port guint16 controller_port, GError **err) { struct rspamd_server *new; - struct hostent *hent; gint nlen, i; g_assert (client != NULL); @@ -1197,22 +1195,6 @@ rspamd_add_server (struct rspamd_client *client, const gchar *host, guint16 port } new = &client->servers[client->servers_num]; - if (*host != '/') { - /* Try to resolve */ - if (!inet_aton (host, &new->addr)) { - /* Try to call gethostbyname */ - hent = gethostbyname (host); - if (hent == NULL) { - if (*err == NULL) { - *err = g_error_new (G_RSPAMD_ERROR, 1, "Cannot resolve: %s", host); - } - return FALSE; - } - else { - memcpy (&new->addr, hent->h_addr, sizeof (struct in_addr)); - } - } - } new->client_port = port; new->controller_port = controller_port; new->host = g_strdup (host); |