[glib: 1/2] gthreadedresolver: don't ignore flags in lookup_by_name_with_flags
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] gthreadedresolver: don't ignore flags in lookup_by_name_with_flags
- Date: Mon, 3 May 2021 10:34:57 +0000 (UTC)
commit 44277865da780f94e6662b824cb1941751f0a21b
Author: Clayton Craft <clayton craftyguy net>
Date: Fri Apr 30 23:20:02 2021 -0700
gthreadedresolver: don't ignore flags in lookup_by_name_with_flags
This fixes a bug where the family flag was ignored in lookup_data_new,
causing the resolver to call getaddrinfo with no hints set when clearly
the family hint should have been set.
gio/gthreadedresolver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index d170c73a9..93794b5b3 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -226,7 +226,7 @@ lookup_by_name_with_flags (GResolver *resolver,
GList *addresses;
LookupData *data;
- data = lookup_data_new (hostname, AF_UNSPEC);
+ data = lookup_data_new (hostname, flags_to_family (flags));
task = g_task_new (resolver, cancellable, NULL, NULL);
g_task_set_source_tag (task, lookup_by_name_with_flags);
g_task_set_name (task, "[gio] resolver lookup");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]