summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-25 21:15:07 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-25 22:00:07 +0100
commit7e8131e9c6c150732503899a092206578fdc13de (patch)
tree4fdf956859911c9e4368a8e018e798465025920b /src/resolve
parentdc477e7385e8ab29efb8fadb72ec994077a105c6 (diff)
dns-domain: change dns_srv_type_is_valid() return value to bool
For similar reasons as dns_name_is_root() got changed in the previous commit.
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-bus.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
index 8885b83101..1fd8e78f92 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/resolve/resolved-bus.c
@@ -1041,13 +1041,8 @@ static int bus_method_resolve_service(sd_bus_message *message, void *userdata, s
if (isempty(type))
type = NULL;
- else {
- r = dns_srv_type_verify(type);
- if (r < 0)
- return r;
- if (r == 0)
- return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid SRV service type '%s'", type);
- }
+ else if (!dns_srv_type_is_valid(type))
+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid SRV service type '%s'", type);
r = dns_name_is_valid(domain);
if (r < 0)