]> git.ipfire.org Git - people/ms/network.git/commitdiff
networkd: Fully implement bus handler for Reload
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Feb 2023 15:26:57 +0000 (15:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Feb 2023 15:26:57 +0000 (15:26 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/networkd/bus.c

index 36ae7c99a31523c1073471eb02d6778dbb0db790..56eda876e9b9b662e1ec662bac0d52f5c22e23a8 100644 (file)
 #include "logging.h"
 
 static int nw_bus_daemon_reload(sd_bus_message* m, void* data, sd_bus_error* error) {
-       return 1;
+       struct nw_daemon* daemon = (struct nw_daemon*)data;
+
+       // Reload the daemon
+       nw_daemon_reload(daemon);
+
+       // Respond with an empty message
+       return sd_bus_reply_method_return(m, NULL);
 }
 
 static int nw_bus_on_connect(sd_bus_message* m, void* data, sd_bus_error* error) {