chiark / gitweb /
resolved: properly pass aborted transaction result back to clients
authorLennart Poettering <lennart@poettering.net>
Wed, 6 Aug 2014 14:32:17 +0000 (16:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Aug 2014 13:06:22 +0000 (15:06 +0200)
src/resolve/resolved-bus.c
src/shared/bus-errors.h

index e158fdc..89a9300 100644 (file)
@@ -51,11 +51,14 @@ static int reply_query_state(DnsQuery *q) {
         case DNS_TRANSACTION_ATTEMPTS_MAX_REACHED:
                 return sd_bus_reply_method_errorf(q->request, SD_BUS_ERROR_TIMEOUT, "All attempts to contact name servers or networks failed");
 
+        case DNS_TRANSACTION_INVALID_REPLY:
+                return sd_bus_reply_method_errorf(q->request, BUS_ERROR_INVALID_REPLY, "Received invalid reply");
+
         case DNS_TRANSACTION_RESOURCES:
                 return sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_RESOURCES, "Not enough resources");
 
-        case DNS_TRANSACTION_INVALID_REPLY:
-                return sd_bus_reply_method_errorf(q->request, BUS_ERROR_INVALID_REPLY, "Received invalid reply");
+        case DNS_TRANSACTION_ABORTED:
+                return sd_bus_reply_method_errorf(q->request, BUS_ERROR_ABORTED, "Query aborted");
 
         case DNS_TRANSACTION_FAILURE: {
                 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
index e4d0d43..504ab1f 100644 (file)
@@ -65,4 +65,5 @@
 #define BUS_ERROR_NO_SUCH_RR "org.freedesktop.resolve1.NoSuchRR"
 #define BUS_ERROR_NO_RESOURCES "org.freedesktop.resolve1.NoResources"
 #define BUS_ERROR_CNAME_LOOP "org.freedesktop.resolve1.CNameLoop"
+#define BUS_ERROR_ABORTED "org.freedesktop.resolve1.Aborted"
 #define _BUS_ERROR_DNS "org.freedesktop.resolve1.DnsError."