38 #include "clientpipe.h" 57 "start Starts the engine and the process. \n" 58 "running Returns acknowledgment that the engine is running.\n" 59 "reload Reload the engine.\n" 60 "stop Stop the engine and terminate the process.\n\n" 65 handles(
const char *cmd, ssize_t n)
67 if (ods_check_command(cmd, n,
"stop"))
return 1;
68 if (ods_check_command(cmd, n,
"reload"))
return 1;
69 if (ods_check_command(cmd, n,
"running"))
return 1;
70 if (ods_check_command(cmd, n,
"start"))
return 1;
80 if (ods_check_command(cmd, n,
"start")) {
82 client_printf(sockfd,
"Engine already running.\n");
85 }
else if (ods_check_command(cmd, n,
"running")) {
87 client_printf(sockfd,
"Engine running.\n");
89 }
else if (ods_check_command(cmd, n,
"reload")) {
91 ods_log_assert(engine);
96 client_printf(sockfd,
"Reloading engine.\n");
98 }
else if (ods_check_command(cmd, n,
"stop")) {
100 ods_log_assert(engine);
105 client_printf(sockfd,
"%s\n", ODS_SE_STOP_RESPONSE);
void ods_log_debug(const char *format,...)
int(* run)(int sockfd, struct engine_struct *engine, const char *cmd, ssize_t n, db_connection_t *dbconn)
struct cmd_func_block * ctrl_funcblock(void)
pthread_cond_t signal_cond
void(* usage)(int sockfd)
pthread_mutex_t signal_lock
int(* handles)(const char *cmd, ssize_t n)