0.96
aCaB 15 years ago
parent 7a3300677a
commit f238189223
  1. 4
      ChangeLog
  2. 2
      clamd/session.c
  3. 4
      clamd/thrmgr.c
  4. 2
      clamd/thrmgr.h

@ -1,3 +1,7 @@
Thu Oct 14 16:06:06 CEST 2010 (acab)
------------------------------------
* clamd: properly terminate zSTATS (bb#2286)
Thu Oct 14 15:36:06 CEST 2010 (acab)
------------------------------------
* freshclam: undefine qcompare if HAVE_GETADDRINFO is unset (bb#2289)

@ -319,7 +319,7 @@ int command(client_conn_t *conn, int *virus)
thrmgr_setactivetask(NULL, "STATS");
if (conn->group)
mdprintf(desc, "%u: ", conn->id);
thrmgr_printstats(desc);
thrmgr_printstats(desc, conn->term);
return 0;
case COMMAND_STREAM:
thrmgr_setactivetask(NULL, "STREAM");

@ -186,7 +186,7 @@ static void print_queue(int f, work_queue_t *queue, struct timeval *tv_now)
(unsigned)queue->item_count);
}
int thrmgr_printstats(int f)
int thrmgr_printstats(int f, char term)
{
struct threadpool_list *l;
unsigned cnt, pool_cnt = 0;
@ -301,7 +301,7 @@ int thrmgr_printstats(int f)
mdprintf(f,"MEMSTATS: heap N/A mmap N/A used N/A free N/A releasable N/A pools %u pools_used %.3fM pools_total %.3fM\n",
pool_cnt, pool_used/(1024*1024.0), pool_total/(1024*1024.0));
}
mdprintf(f,"END\n");
mdprintf(f,"END%c", term);
pthread_mutex_unlock(&pools_lock);
return 0;
}

@ -105,7 +105,7 @@ int thrmgr_group_finished(jobgroup_t *group, enum thrmgr_exit exitc);
int thrmgr_group_need_terminate(jobgroup_t *group);
void thrmgr_group_terminate(jobgroup_t *group);
jobgroup_t *thrmgr_group_new(void);
int thrmgr_printstats(int outfd);
int thrmgr_printstats(int outfd, char term);
void thrmgr_setactivetask(const char *filename, const char* command);
void thrmgr_setactiveengine(const struct cl_engine *engine);

Loading…
Cancel
Save