X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fdirplex%2Fconf.c;h=e40a44542043648f1919904049022d28c674f3c1;hp=ffa43138d6db56ed4c44c0a9dc6571fc6f497c60;hb=da75c835b71b9ed9cf1d2c8fcbcfb7631dd24a05;hpb=a756e349cf57ac9468161439a1452490dc009c94 diff --git a/src/dirplex/conf.c b/src/dirplex/conf.c index ffa4313..e40a445 100644 --- a/src/dirplex/conf.c +++ b/src/dirplex/conf.c @@ -329,7 +329,7 @@ struct config **getconfigs(char *file) return(ret = buf.b); } -struct child *findchild(char *file, char *name) +struct child *findchild(char *file, char *name, struct config **cf) { int i; struct config **cfs; @@ -337,10 +337,13 @@ struct child *findchild(char *file, char *name) cfs = getconfigs(file); for(i = 0; cfs[i] != NULL; i++) { - if((ch = getchild(cfs[i], name)) != NULL) - break; + if((ch = getchild(cfs[i], name)) != NULL) { + if(cf != NULL) + *cf = cfs[i]; + return(ch); + } } - return(ch); + return(NULL); } struct pattern *findmatch(char *file, int trydefault, int dir)