src/server/daemon/log.c

changeset 579
e10457d74fe1
parent 577
4f5ccaea4a92
equal deleted inserted replaced
578:eb48f716b31c 579:e10457d74fe1
253 pthread_mutex_unlock(&mutex); 253 pthread_mutex_unlock(&mutex);
254 } 254 }
255 255
256 void log_remove_logdup(LogDup *ldup) { 256 void log_remove_logdup(LogDup *ldup) {
257 pthread_mutex_lock(&mutex); 257 pthread_mutex_lock(&mutex);
258 CxMutIterator i = cxListMutIterator(log_dup_list); 258 CxIterator i = cxListMutIterator(log_dup_list);
259 WSBool finished = 0; 259 WSBool finished = 0;
260 cx_foreach(LogDup *, dup, i) { 260 cx_foreach(LogDup *, dup, i) {
261 if(finished) break; 261 if(finished) break;
262 if(dup == ldup) { 262 if(dup == ldup) {
263 cxIteratorFlagRemoval(i); 263 cxIteratorFlagRemoval(i);
414 414
415 return log; 415 return log;
416 } 416 }
417 417
418 void shutdown_logging(void) { 418 void shutdown_logging(void) {
419 CxIterator i = cxMapIteratorValues(access_log_files); 419 CxMapIterator i = cxMapIteratorValues(access_log_files);
420 cx_foreach(LogFile *, log, i) { 420 cx_foreach(LogFile *, log, i) {
421 fclose(log->file); 421 fclose(log->file);
422 free(log); 422 free(log);
423 } 423 }
424 cxMapDestroy(access_log_files); 424 cxMapFree(access_log_files);
425 425
426 if(log_dup_list) { 426 if(log_dup_list) {
427 cxListDestroy(log_dup_list); 427 cxListFree(log_dup_list);
428 } 428 }
429 } 429 }

mercurial