30#include "cmdhandler.h"
34#include "clientpipe.h"
35#include "longgetopt.h"
54 "Update the configuration from conf.xml and reload the Enforcer.\n\n"
59run(cmdhandler_ctx_type* context,
int argc,
char* argv[])
61 int sockfd = context->sockfd;
63 char *zonelist = NULL;
64 char **repositories = NULL;
65 int repository_count = 0;
69 if (
check_conf(engine->config->cfg_filename, &kasp, &zonelist, &repositories, &repository_count, (ods_log_verbosity() >= 3))) {
70 client_printf_err(sockfd,
"Unable to validate '%s' consistency.",
71 engine->config->cfg_filename);
76 for (i = 0; i < repository_count; i++) {
77 free(repositories[i]);
87 for (i = 0; i < repository_count; i++) {
88 free(repositories[i]);
93 engine->need_to_reload = 1;
94 pthread_cond_signal(&engine->signal_cond);
100 "update conf", &usage, &help, NULL, NULL, &run, NULL
engine_type * getglobalcontext(cmdhandler_ctx_type *context)
struct engine_struct engine_type
int check_conf(const char *conf, char **kasp, char **zonelist, char ***repo_listout, int *repo_countout, int verbose)
struct cmd_func_block update_conf_funcblock