]> git.meshlink.io Git - meshlink/blobdiff - src/control.c
Reload configuration through control socket
[meshlink] / src / control.c
index 3e57f5512f4f759b1043ea23d0634232b7c0cdef..57e0ce09816061e394cb17b53ec7b857c6898435 100644 (file)
@@ -124,6 +124,18 @@ static void handle_control_data(struct bufferevent *event, void *data) {
                goto respond;
        }
 
+       if(req.type == REQ_RETRY) {
+               logger(LOG_NOTICE, _("Got '%s' command"), "retry");
+               retry();
+               goto respond;
+       }
+
+       if(req.type == REQ_RELOAD) {
+               logger(LOG_NOTICE, _("Got '%s' command"), "reload");
+               res.res_errno = reload_configuration();
+               goto respond;
+       }
+
        logger(LOG_DEBUG, _("Malformed control command received"));
        res.res_errno = EINVAL;