]> git.meshlink.io Git - meshlink/blobdiff - src/control.c
Purge through the control socket
[meshlink] / src / control.c
index 19ac37a4dd23857200ccd4ca84e91314086afc81..2c5d4be847eba078069795c134f4cce929ff2d64 100644 (file)
@@ -97,6 +97,12 @@ static void handle_control_data(struct bufferevent *event, void *data) {
                goto respond;
        }
 
+       if(req.type == REQ_PURGE) {
+               logger(LOG_NOTICE, _("Got '%s' command"), "purge");
+               purge();
+               goto respond;
+       }
+
        logger(LOG_DEBUG, _("Malformed control command received"));
        res.res_errno = EINVAL;