git-svn: trunk@3972
Tomasz Kojm authored on 2008/07/19 01:47:44... | ... |
@@ -148,7 +148,7 @@ static void help(void) |
148 | 148 |
mprintf("\n"); |
149 | 149 |
} |
150 | 150 |
|
151 |
-static int download(const struct cfgstruct *copt, const struct optstruct *opt, const char *datadir) |
|
151 |
+static int download(const struct cfgstruct *copt, const struct optstruct *opt, const char *datadir, const char *cfgfile) |
|
152 | 152 |
{ |
153 | 153 |
int ret = 0, try = 0, maxattempts = 0; |
154 | 154 |
const struct cfgstruct *cpt; |
... | ... |
@@ -158,7 +158,7 @@ static int download(const struct cfgstruct *copt, const struct optstruct *opt, c |
158 | 158 |
logg("*Max retries == %d\n", maxattempts); |
159 | 159 |
|
160 | 160 |
if(!(cpt = cfgopt(copt, "DatabaseMirror"))->enabled) { |
161 |
- logg("^You must specify at least one database mirror.\n"); |
|
161 |
+ logg("^You must specify at least one database mirror in %s\n", cfgfile); |
|
162 | 162 |
return 56; |
163 | 163 |
} else { |
164 | 164 |
while(cpt) { |
... | ... |
@@ -175,7 +175,7 @@ static int download(const struct cfgstruct *copt, const struct optstruct *opt, c |
175 | 175 |
logg("Giving up on %s...\n", cpt->strarg); |
176 | 176 |
cpt = (struct cfgstruct *) cpt->nextarg; |
177 | 177 |
if(!cpt) { |
178 |
- logg("Update failed. Your network may be down or none of the mirrors listed in freshclam.conf is working. Check http://www.clamav.net/support/mirror-problem for possible reasons.\n"); |
|
178 |
+ logg("Update failed. Your network may be down or none of the mirrors listed in %s is working. Check http://www.clamav.net/support/mirror-problem for possible reasons.\n", cfgfile); |
|
179 | 179 |
} |
180 | 180 |
try = 0; |
181 | 181 |
} |
... | ... |
@@ -524,7 +524,7 @@ int main(int argc, char **argv) |
524 | 524 |
#endif |
525 | 525 |
|
526 | 526 |
while(!terminate) { |
527 |
- ret = download(copt, opt, newdir); |
|
527 |
+ ret = download(copt, opt, newdir, cfgfile); |
|
528 | 528 |
|
529 | 529 |
if(ret > 1) { |
530 | 530 |
if(opt_check(opt, "on-error-execute")) |
... | ... |
@@ -576,7 +576,7 @@ int main(int argc, char **argv) |
576 | 576 |
} |
577 | 577 |
|
578 | 578 |
} else |
579 |
- ret = download(copt, opt, newdir); |
|
579 |
+ ret = download(copt, opt, newdir, cfgfile); |
|
580 | 580 |
|
581 | 581 |
if(ret > 1) { |
582 | 582 |
if(opt_check(opt, "on-error-execute")) |