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.
This commit is contained in:
Clayton Craft 2021-04-30 23:20:02 -07:00 committed by Philip Withnall
parent 5e00581980
commit 9383b9a955

View File

@ -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");