It is possible that the upstream servers return something, but
we then filter all results because they are of the wrong type.
In that case the API and subsequent GTask calls expect a GError
to be set.
https://bugzilla.gnome.org/show_bug.cgi?id=696857
records = g_list_prepend (records, record);
}
+ if (records == NULL)
+ {
+ g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
+ _("No DNS record of the requested type for '%s'"), rrname);
+
+ return NULL;
+ }
+ else
return records;
}
records = g_list_prepend (records, g_variant_ref_sink (record));
}
- return records;
+ if (records == NULL)
+ {
+ g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
+ _("No DNS record of the requested type for '%s'"), rrname);
+
+ return NULL;
+ }
+ else
+ return records;
}
#endif