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
parent 2b3848dd7e
commit 44277865da
No known key found for this signature in database
GPG Key ID: 7A3461CA187CEA54

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