commit da824663803ae80433d15b705ae6791fe0283178 from: Omar Polo date: Fri Jan 28 21:49:14 2022 UTC fix the restart of the main process delete useless functions such as merge_config and config_clear while here. commit - c1e62371f5d793da2e633865ff42b116e94e6489 commit + da824663803ae80433d15b705ae6791fe0283178 blob - c763c92cc6758b5692577a9661360a442481a1ef blob + e16f385fe3c4138e21b132d58ea30325188480e7 --- kamid/kamid.c +++ kamid/kamid.c @@ -449,7 +449,9 @@ main_reload(void) if (main_imsg_send_config(xconf) == -1) return -1; - merge_config(main_conf, xconf); + /* replace old configuration with the new one */ + clear_config(main_conf); + main_conf = xconf; return 0; } @@ -519,14 +521,6 @@ main_imsg_send_config(struct kd_conf *xconf) return 0; #undef SEND -} - -void -merge_config(struct kd_conf *conf, struct kd_conf *xconf) -{ - /* do stuff... */ - - free(xconf); } struct kd_conf * @@ -542,18 +536,6 @@ config_new_empty(void) return xconf; } -void -config_clear(struct kd_conf *conf) -{ - struct kd_conf *xconf; - - /* Merge current config with an empty one. */ - xconf = config_new_empty(); - merge_config(conf, xconf); - - free(conf); -} - __dead void main_shutdown(void) {