src/server/daemon/srvctrl.c

changeset 439
255e316db762
parent 415
d938228c382e
equal deleted inserted replaced
438:22eca559aded 439:255e316db762
41 #include <cx/buffer.h> 41 #include <cx/buffer.h>
42 #include <cx/printf.h> 42 #include <cx/printf.h>
43 43
44 #include "srvctrl.h" 44 #include "srvctrl.h"
45 45
46 #define SRVCTRL_THREAD_STACKSIZE 8192 46 #define SRVCTRL_THREAD_STACKSIZE 262144
47 47
48 static int srvctrl; 48 static int srvctrl;
49 static cxmutstr srvctrl_path; 49 static cxmutstr srvctrl_path;
50 50
51 static WSBool srv_shutdown; 51 static WSBool srv_shutdown;
180 } 180 }
181 181
182 int srvctrl_handle_cmd(SrvCtrlClient *client, cxmutstr cmd) { 182 int srvctrl_handle_cmd(SrvCtrlClient *client, cxmutstr cmd) {
183 if(!cx_strcmp(cx_strcast(cmd), cx_str("reconfig"))) { 183 if(!cx_strcmp(cx_strcast(cmd), cx_str("reconfig"))) {
184 log_ereport(LOG_INFORM, "reconfigure server"); 184 log_ereport(LOG_INFORM, "reconfigure server");
185 if(webserver_reconfig()) { 185 if(!webserver_reconfig()) {
186 log_ereport(LOG_FAILURE, "cannot reload config");
187 } else {
188 log_ereport(LOG_INFORM, "reconfig: success"); 186 log_ereport(LOG_INFORM, "reconfig: success");
189 } 187 }
190 } else if(!cx_strcmp(cx_strcast(cmd), cx_str("shutdown"))) { 188 } else if(!cx_strcmp(cx_strcast(cmd), cx_str("shutdown"))) {
191 webserver_shutdown(); 189 webserver_shutdown();
192 } else if(!cx_strcmp(cx_strcast(cmd), cx_str("stat"))) { 190 } else if(!cx_strcmp(cx_strcast(cmd), cx_str("stat"))) {

mercurial