From: Wilfried Goesgens Date: Tue, 21 Oct 2014 22:20:17 +0000 (+0200) Subject: Mostly we should happen to add one IO context, output its id. X-Git-Tag: v9.01~112 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=f9692bdc53d7094bbb7e5c5aba06a8dc8d19c852 Mostly we should happen to add one IO context, output its id. --- diff --git a/citadel/modules/eventclient/serv_eventclient.c b/citadel/modules/eventclient/serv_eventclient.c index 04e1938e9..4a27c2482 100644 --- a/citadel/modules/eventclient/serv_eventclient.c +++ b/citadel/modules/eventclient/serv_eventclient.c @@ -611,6 +611,8 @@ ev_async ExitEventLoop; static void QueueEventAddCallback(EV_P_ ev_async *w, int revents) { CitContext *Ctx; + long IOID = -1; + long count = 0; ev_tstamp Now; HashList *q; void *v; @@ -635,9 +637,11 @@ static void QueueEventAddCallback(EV_P_ ev_async *w, int revents) while (GetNextHashPos(q, It, &len, &Key, &v)) { IOAddHandler *h = v; + count ++; if (h->IO->ID == 0) { h->IO->ID = EvIDSource++; } + IOID = h->IO->ID; if (h->IO->StartIO == 0.0) h->IO->StartIO = Now; @@ -669,7 +673,7 @@ static void QueueEventAddCallback(EV_P_ ev_async *w, int revents) } DeleteHashPos(&It); DeleteHashContent(&q); - EVQM_syslog(LOG_DEBUG, "EVENT Q Add done.\n"); + EVQ_syslog(LOG_DEBUG, "%s CC[%ld] EVENT Q Add %ld done.", IOSTR, IOID, count); } @@ -762,6 +766,8 @@ extern void ShutDownDBCLient(AsyncIO *IO); static void DBQueueEventAddCallback(EV_P_ ev_async *w, int revents) { CitContext *Ctx; + long IOID = -1; + long count = 0;; ev_tstamp Now; HashList *q; void *v; @@ -788,8 +794,10 @@ static void DBQueueEventAddCallback(EV_P_ ev_async *w, int revents) { IOAddHandler *h = v; eNextState rc; + count ++; if (h->IO->ID == 0) h->IO->ID = EvIDSource++; + IOID = h->IO->ID; if (h->IO->StartDB == 0.0) h->IO->StartDB = Now; h->IO->Now = Now; @@ -809,7 +817,7 @@ static void DBQueueEventAddCallback(EV_P_ ev_async *w, int revents) } DeleteHashPos(&It); DeleteHashContent(&q); - EVQM_syslog(LOG_DEBUG, "DBEVENT Q Add done.\n"); + EVQ_syslog(LOG_DEBUG, "%s CC[%ld] DBEVENT Q Add %ld done.", IOSTR, IOID, count); }