Browse code

clamconf: handle .cld databases (bb#1101)

git-svn: trunk@3966

Tomasz Kojm authored on 2008/07/17 01:16:25
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Jul 16 17:52:12 CEST 2008 (tk)
2
+----------------------------------
3
+  * clamconf: handle .cld databases (bb#1101)
4
+
1 5
 Wed Jul 16 16:33:08 CEST 2008 (tk)
2 6
 ----------------------------------
3 7
   * clamd: improve handling of memory errors
... ...
@@ -175,14 +175,14 @@ static void printdb(const char *dir, const char *db)
175 175
 {
176 176
 	struct cl_cvd *cvd;
177 177
 	char path[256];
178
-	unsigned int inc = 0;
178
+	unsigned int cld = 0;
179 179
 	time_t t;
180 180
 
181 181
 
182 182
     snprintf(path, sizeof(path), "%s/%s.cvd", dir, db);
183 183
     if(access(path, R_OK) == -1) {
184
-	snprintf(path, sizeof(path), "%s/%s.inc/%s.info", dir, db, db);
185
-	inc = 1;
184
+	snprintf(path, sizeof(path), "%s/%s.cld", dir, db);
185
+	cld = 1;
186 186
 	if(access(path, R_OK) == -1) {
187 187
 	    printf("%s db: Not found\n", db);
188 188
 	    return;
... ...
@@ -191,7 +191,7 @@ static void printdb(const char *dir, const char *db)
191 191
 
192 192
     if((cvd = cl_cvdhead(path))) {
193 193
 	t = (time_t) cvd->stime;
194
-	printf("%s db: Format: %s, Version: %u, Build time: %s", db, inc ? ".inc" : ".cvd", cvd->version, ctime(&t));
194
+	printf("%s db: Format: %s, Version: %u, Build time: %s", db, cld ? ".cld" : ".cvd", cvd->version, ctime(&t));
195 195
 	cl_cvdfree(cvd);
196 196
     }
197 197
 }