X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fpatplex.c;h=bf4fda9ad3058a3ffe9d36a983c0e5b3ba4294dc;hp=3b3d7f9a5741855c53e7f97e8f7cf928ecebc0a0;hb=1924fe8c26de2861744fd576631ad15da2759f51;hpb=09c82f9c7bc563c081425141853e6ff8e402e358 diff --git a/src/patplex.c b/src/patplex.c index 3b3d7f9..bf4fda9 100644 --- a/src/patplex.c +++ b/src/patplex.c @@ -446,21 +446,12 @@ static void serve(struct hthead *req, int fd) static void reloadconf(char *nm) { struct config *cf; - struct child *ch1, *ch2; if((cf = readconfig(nm)) == NULL) { flog(LOG_WARNING, "could not reload configuration file `%s'", nm); return; } - for(ch1 = cf->children; ch1 != NULL; ch1 = ch1->next) { - for(ch2 = lconfig->children; ch2 != NULL; ch2 = ch2->next) { - if(!strcmp(ch1->name, ch2->name)) { - ch1->fd = ch2->fd; - ch2->fd = -1; - break; - } - } - } + mergechildren(cf->children, lconfig->children); freeconfig(lconfig); lconfig = cf; }