git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4676 77e5149b-7576-45b1-b177-96237e5ba77b
aCaB authored on 2009/02/05 02:18:49... | ... |
@@ -47,15 +47,6 @@ static void print_server_version(const struct optstruct *opt) |
47 | 47 |
} |
48 | 48 |
} |
49 | 49 |
|
50 |
-static int reload_server_database(const struct optstruct *opt) |
|
51 |
-{ |
|
52 |
- if(reload_clamd_database(opt)) { |
|
53 |
- logg("!Clamd did not reload the database\n"); |
|
54 |
- return 2; |
|
55 |
- } |
|
56 |
- return 0; |
|
57 |
-} |
|
58 |
- |
|
59 | 50 |
int main(int argc, char **argv) |
60 | 51 |
{ |
61 | 52 |
int ds, dms, ret, infected; |
... | ... |
@@ -110,7 +101,7 @@ int main(int argc, char **argv) |
110 | 110 |
|
111 | 111 |
|
112 | 112 |
if(optget(opts, "reload")->enabled) { |
113 |
- ret = reload_server_database(opts); |
|
113 |
+ ret = reload_clamd_database(opts); |
|
114 | 114 |
optfree(opts); |
115 | 115 |
logg_close(); |
116 | 116 |
exit(ret); |
... | ... |
@@ -405,7 +405,7 @@ struct client_cb_data { |
405 | 405 |
int spam; |
406 | 406 |
}; |
407 | 407 |
|
408 |
-int callback(struct stat *sb, char *filename, const char *path, enum cli_ftw_reason reason, struct cli_ftw_cbdata *data) { |
|
408 |
+static int callback(struct stat *sb, char *filename, const char *path, enum cli_ftw_reason reason, struct cli_ftw_cbdata *data) { |
|
409 | 409 |
struct client_cb_data *c = (struct client_cb_data *)data->data; |
410 | 410 |
int sockd, ret; |
411 | 411 |
const char *f = filename; |
... | ... |
@@ -536,11 +536,10 @@ int reload_clamd_database(const struct optstruct *opts) |
536 | 536 |
} |
537 | 537 |
|
538 | 538 |
if(!(len = recvln(&rcv, &buff, NULL)) || len < 10 || memcmp(buff, "RELOADING", 9)) { |
539 |
- logg("!Incorrect reply from clamd\n"); |
|
539 |
+ logg("!Clamd did not reload the database\n"); |
|
540 | 540 |
close(sockd); |
541 | 541 |
return 2; |
542 | 542 |
} |
543 |
- |
|
544 | 543 |
close(sockd); |
545 | 544 |
return 0; |
546 | 545 |
} |