resolv->debug_data = user_data;
}
-int g_resolv_add_nameserver(GResolv *resolv, const char *address,
+gboolean g_resolv_add_nameserver(GResolv *resolv, const char *address,
uint16_t port, unsigned long flags)
{
struct resolv_nameserver *nameserver;
if (resolv == NULL)
- return -EINVAL;
+ return FALSE;
nameserver = g_try_new0(struct resolv_nameserver, 1);
if (nameserver == NULL)
- return -ENOMEM;
+ return FALSE;
nameserver->address = g_strdup(address);
nameserver->port = port;
if (connect_udp_channel(nameserver) < 0) {
free_nameserver(nameserver);
- return -EIO;
+ return FALSE;
}
nameserver->resolv = resolv;
debug(resolv, "setting nameserver %s", address);
- return 0;
+ return TRUE;
}
void g_resolv_flush_nameservers(GResolv *resolv)
void g_resolv_set_debug(GResolv *resolv,
GResolvDebugFunc func, gpointer user_data);
-int g_resolv_add_nameserver(GResolv *resolv, const char *address,
+gboolean g_resolv_add_nameserver(GResolv *resolv, const char *address,
uint16_t port, unsigned long flags);
void g_resolv_flush_nameservers(GResolv *resolv);