mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
parent
cc194dddc2
commit
b48ab08732
@ -1148,6 +1148,11 @@ static void resolve_service_all_complete(DnsQuery *query) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
|
if (isempty(type)) {
|
||||||
|
r = reply_method_errorf(q, BUS_ERROR_NO_SUCH_SERVICE, "'%s' does not provide valid service", dns_query_string(q));
|
||||||
|
goto finish;
|
||||||
|
}
|
||||||
|
|
||||||
r = sd_bus_message_append(
|
r = sd_bus_message_append(
|
||||||
reply,
|
reply,
|
||||||
"ssst",
|
"ssst",
|
||||||
|
@ -828,6 +828,11 @@ static void resolve_service_all_complete(DnsQuery *query) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
|
if (isempty(type)) {
|
||||||
|
r = sd_varlink_error(q->varlink_request, "io.systemd.Resolve.ServiceNotProvided", NULL);
|
||||||
|
goto finish;
|
||||||
|
}
|
||||||
|
|
||||||
r = sd_varlink_replybo(
|
r = sd_varlink_replybo(
|
||||||
query->varlink_request,
|
query->varlink_request,
|
||||||
SD_JSON_BUILD_PAIR("services", SD_JSON_BUILD_VARIANT(srv)),
|
SD_JSON_BUILD_PAIR("services", SD_JSON_BUILD_VARIANT(srv)),
|
||||||
|
Loading…
Reference in New Issue
Block a user