git-svn: trunk@420
Tomasz Kojm authored on 2004/03/20 05:38:55... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Fri Mar 19 21:42:51 CET 2004 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * clamd: thrmgr.c, server-th.c: added missing new line characters in logg() |
|
4 |
+ (reported by Sergey <a_s_y*sama.ru>) |
|
5 |
+ |
|
1 | 6 |
Fri Mar 19 17:48:31 GMT 2004 (njh) |
2 | 7 |
---------------------------------- |
3 | 8 |
* libclamav/message.c: Handle "binary encoding" (whatever that is :-) |
... | ... |
@@ -52,6 +52,7 @@ have been reviewed by our team): |
52 | 52 |
+ qscanq - Virus Scanning for Qmail |
53 | 53 |
+ clamavr - Ruby binding for ClamAV |
54 | 54 |
+ DansGuardian Anti-Virus Plugin |
55 |
+ + Viralator - a Perl script that virus scans http downloads |
|
55 | 56 |
+ ClamAssassin - a filter for procmail |
56 | 57 |
+ Gadoyanvirus - a filter for Qmail |
57 | 58 |
+ OpenProtect - a complete e-mail protection solution |
... | ... |
@@ -52,6 +52,7 @@ have been reviewed by our team): |
52 | 52 |
+ qscanq - Virus Scanning for Qmail |
53 | 53 |
+ clamavr - Ruby binding for ClamAV |
54 | 54 |
+ DansGuardian Anti-Virus Plugin |
55 |
+ + Viralator - a Perl script that virus scans http downloads |
|
55 | 56 |
+ ClamAssassin - a filter for procmail |
56 | 57 |
+ Gadoyanvirus - a filter for Qmail |
57 | 58 |
+ OpenProtect - a complete e-mail protection solution |
... | ... |
@@ -400,7 +400,7 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop |
400 | 400 |
pthread_mutex_init(&reload_mutex, NULL); |
401 | 401 |
|
402 | 402 |
if((thr_pool=thrmgr_new(max_threads, 30, scanner_thread)) == NULL) { |
403 |
- logg("thrmgr_new failed"); |
|
403 |
+ logg("!thrmgr_new failed\n"); |
|
404 | 404 |
exit(-1); |
405 | 405 |
} |
406 | 406 |
|
... | ... |
@@ -411,7 +411,7 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop |
411 | 411 |
if((new_sd == -1) && (errno != EINTR)) { |
412 | 412 |
/* very bad - need to exit or restart */ |
413 | 413 |
#ifdef HAVE_STRERROR_R |
414 |
- logg("!accept() failed: %s", strerror_r(errno, buff, BUFFSIZE)); |
|
414 |
+ logg("!accept() failed: %s\n", strerror_r(errno, buff, BUFFSIZE)); |
|
415 | 415 |
#else |
416 | 416 |
logg("!accept() failed\n"); |
417 | 417 |
#endif |
... | ... |
@@ -435,7 +435,7 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop |
435 | 435 |
if (!thrmgr_dispatch(thr_pool, client_conn)) { |
436 | 436 |
close(client_conn->sd); |
437 | 437 |
free(client_conn); |
438 |
- logg("!thread dispatch failed"); |
|
438 |
+ logg("!thread dispatch failed\n"); |
|
439 | 439 |
} |
440 | 440 |
} |
441 | 441 |
|
... | ... |
@@ -468,7 +468,7 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop |
468 | 468 |
thrmgr_destroy(thr_pool); |
469 | 469 |
root = reload_db(root, copt, FALSE); |
470 | 470 |
if((thr_pool=thrmgr_new(max_threads, 30, scanner_thread)) == NULL) { |
471 |
- logg("!thrmgr_new failed"); |
|
471 |
+ logg("!thrmgr_new failed\n"); |
|
472 | 472 |
pthread_mutex_unlock(&reload_mutex); |
473 | 473 |
exit(-1); |
474 | 474 |
} |
... | ... |
@@ -85,7 +85,7 @@ void thrmgr_destroy(threadpool_t *threadpool) |
85 | 85 |
return; |
86 | 86 |
} |
87 | 87 |
if (pthread_mutex_lock(&threadpool->pool_mutex) != 0) { |
88 |
- logg("!Mutex lock failed"); |
|
88 |
+ logg("!Mutex lock failed\n"); |
|
89 | 89 |
exit(-1); |
90 | 90 |
} |
91 | 91 |
threadpool->state = POOL_EXIT; |
... | ... |
@@ -104,7 +104,7 @@ void thrmgr_destroy(threadpool_t *threadpool) |
104 | 104 |
} |
105 | 105 |
} |
106 | 106 |
if (pthread_mutex_unlock(&threadpool->pool_mutex) != 0) { |
107 |
- logg("!Mutex unlock failed"); |
|
107 |
+ logg("!Mutex unlock failed\n"); |
|
108 | 108 |
exit(-1); |
109 | 109 |
} |
110 | 110 |
|
... | ... |
@@ -167,7 +167,7 @@ void *thrmgr_worker(void *arg) |
167 | 167 |
for (;;) { |
168 | 168 |
if (pthread_mutex_lock(&(threadpool->pool_mutex)) != 0) { |
169 | 169 |
/* Fatal error */ |
170 |
- logg("!Fatal: mutex lock failed"); |
|
170 |
+ logg("!Fatal: mutex lock failed\n"); |
|
171 | 171 |
exit(-2); |
172 | 172 |
} |
173 | 173 |
timeout.tv_sec = time(NULL) + threadpool->idle_timeout; |
... | ... |
@@ -190,7 +190,7 @@ void *thrmgr_worker(void *arg) |
190 | 190 |
|
191 | 191 |
if (pthread_mutex_unlock(&(threadpool->pool_mutex)) != 0) { |
192 | 192 |
/* Fatal error */ |
193 |
- logg("!Fatal: mutex unlock failed"); |
|
193 |
+ logg("!Fatal: mutex unlock failed\n"); |
|
194 | 194 |
exit(-2); |
195 | 195 |
} |
196 | 196 |
if (job_data) { |
... | ... |
@@ -201,7 +201,7 @@ void *thrmgr_worker(void *arg) |
201 | 201 |
} |
202 | 202 |
if (pthread_mutex_lock(&(threadpool->pool_mutex)) != 0) { |
203 | 203 |
/* Fatal error */ |
204 |
- logg("!Fatal: mutex lock failed"); |
|
204 |
+ logg("!Fatal: mutex lock failed\n"); |
|
205 | 205 |
exit(-2); |
206 | 206 |
} |
207 | 207 |
threadpool->thr_alive--; |
... | ... |
@@ -211,7 +211,7 @@ void *thrmgr_worker(void *arg) |
211 | 211 |
} |
212 | 212 |
if (pthread_mutex_unlock(&(threadpool->pool_mutex)) != 0) { |
213 | 213 |
/* Fatal error */ |
214 |
- logg("!Fatal: mutex unlock failed"); |
|
214 |
+ logg("!Fatal: mutex unlock failed\n"); |
|
215 | 215 |
exit(-2); |
216 | 216 |
} |
217 | 217 |
return NULL; |
... | ... |
@@ -227,7 +227,7 @@ int thrmgr_dispatch(threadpool_t *threadpool, void *user_data) |
227 | 227 |
|
228 | 228 |
/* Lock the threadpool */ |
229 | 229 |
if (pthread_mutex_lock(&(threadpool->pool_mutex)) != 0) { |
230 |
- logg("!Mutex lock failed"); |
|
230 |
+ logg("!Mutex lock failed\n"); |
|
231 | 231 |
return FALSE; |
232 | 232 |
} |
233 | 233 |
|
... | ... |
@@ -241,7 +241,7 @@ int thrmgr_dispatch(threadpool_t *threadpool, void *user_data) |
241 | 241 |
/* Start a new thread */ |
242 | 242 |
if (pthread_create(&thr_id, &(threadpool->pool_attr), |
243 | 243 |
thrmgr_worker, threadpool) != 0) { |
244 |
- logg("!pthread_create failed"); |
|
244 |
+ logg("!pthread_create failed\n"); |
|
245 | 245 |
} else { |
246 | 246 |
threadpool->thr_alive++; |
247 | 247 |
} |
... | ... |
@@ -249,7 +249,7 @@ int thrmgr_dispatch(threadpool_t *threadpool, void *user_data) |
249 | 249 |
pthread_cond_signal(&(threadpool->pool_cond)); |
250 | 250 |
|
251 | 251 |
if (pthread_mutex_unlock(&(threadpool->pool_mutex)) != 0) { |
252 |
- logg("!Mutex unlock failed"); |
|
252 |
+ logg("!Mutex unlock failed\n"); |
|
253 | 253 |
return FALSE; |
254 | 254 |
} |
255 | 255 |
return TRUE; |