git-svn: trunk@2625
Tomasz Kojm authored on 2007/01/15 08:46:50... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Mon Jan 15 00:45:00 CET 2007 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * libclamav/readdb.c: cli_loaddbdir_l fixes (bb#228), thanks to |
|
4 |
+ Gianluigi Tiesi <sherpya*netfarm.it> |
|
5 |
+ |
|
1 | 6 |
Sun Jan 14 20:34:07 CET 2007 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* freshclam/manager.c: better handling of scripted updates (bb#129) |
... | ... |
@@ -1209,7 +1209,7 @@ static int cli_loaddbdir_l(const char *dirname, struct cl_engine **engine, unsig |
1209 | 1209 |
} result; |
1210 | 1210 |
#endif |
1211 | 1211 |
char *dbfile; |
1212 |
- int ret; |
|
1212 |
+ int ret = CL_ESUPPORT; |
|
1213 | 1213 |
|
1214 | 1214 |
|
1215 | 1215 |
if((dd = opendir(dirname)) == NULL) { |
... | ... |
@@ -1270,12 +1270,15 @@ static int cli_loaddbdir_l(const char *dirname, struct cl_engine **engine, unsig |
1270 | 1270 |
} |
1271 | 1271 |
|
1272 | 1272 |
closedir(dd); |
1273 |
- return CL_SUCCESS; |
|
1273 |
+ if(ret == CL_ESUPPORT) |
|
1274 |
+ cli_errmsg("cli_loaddb(): No supported database files found in %s\n", dirname); |
|
1275 |
+ |
|
1276 |
+ return ret; |
|
1274 | 1277 |
} |
1275 | 1278 |
|
1276 | 1279 |
static int cli_loaddbdir(const char *dirname, struct cl_engine **engine, unsigned int *signo, unsigned int options) |
1277 | 1280 |
{ |
1278 |
- int ret, try; |
|
1281 |
+ int ret, try = 0; |
|
1279 | 1282 |
|
1280 | 1283 |
|
1281 | 1284 |
cli_dbgmsg("cli_loaddbdir: Acquiring dbdir lock\n"); |