]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Recognize _DISCONNECT
authorMartin Vidner <mvidner@suse.cz>
Fri, 1 Nov 2019 16:32:55 +0000 (17:32 +0100)
committerMartin Vidner <mvidner@suse.cz>
Fri, 13 Dec 2019 15:31:47 +0000 (16:31 +0100)
zypp-plugin/zypp_commit_plugin.h
zypp-plugin/zypp_plugin.cc
zypp-plugin/zypp_plugin.h

index cf9a18ce3caca42c125491b2286c7183e5bab3e6..08d83cf126467b07a86246500e9152fa7884d237 100644 (file)
@@ -16,11 +16,5 @@ public:
     virtual Message commit_end(const Message& m) {
        return ack();
     }
-
-    Message ack() {
-       Message a;
-       a.command = "ACK";
-       return a;
-    }
 };
 
index a933129a83e4e2515d1eeb35c5422fdb56c37dc1..2a7cf8527a0d6903ec002742754beaaad0031698 100644 (file)
@@ -70,6 +70,9 @@ int ZyppPlugin::main() {
 }
 
 ZyppPlugin::Message ZyppPlugin::dispatch(const Message& msg) {
+    if (msg.command == "_DISCONNECT") {
+       return ack();
+    }
     Message a;
     a.command = "_ENOMETHOD";
     a.headers["Command"] = msg.command;
index 10cb3c39a0ed2dca0345a744478779147bbe95ba..aaba56749fe32a9e26e35d87fc91fb4e7e8f7ba9 100644 (file)
@@ -15,4 +15,10 @@ public:
     virtual Message dispatch(const Message&);
     void answer(const Message&);
     virtual ~ZyppPlugin() {}
+
+    Message ack() {
+       Message a;
+       a.command = "ACK";
+       return a;
+    }
 };