Coding style corrections
[tinc] / src / control.c
index 6a39e02..a795843 100644 (file)
@@ -58,7 +58,7 @@ static void handle_control_data(struct bufferevent *event, void *data) {
        res.id = req.id;
 
        res_data = evbuffer_new();
-       if (res_data == NULL) {
+       if(res_data == NULL) {
                res.res_errno = ENOMEM;
                goto respond;
        }
@@ -130,6 +130,12 @@ static void handle_control_data(struct bufferevent *event, void *data) {
                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;