curl_easy_strerror(sta));
IO = (AsyncIO *)chandle;
+ IO->Now = ev_now(event_base);
+
ev_io_stop(event_base, &IO->recv_event);
ev_io_stop(event_base, &IO->send_event);
{
IO->HttpReq.ReplyData = NewStrBufPlain(NULL, SIZ);
}
+ IO->Now = ev_now(event_base);
return CurlFillStrBuf_callback(data,
size,
nmemb,
curl_multi_assign(mhnd, fd, IO);
}
+ IO->Now = ev_now(event_base);
+
Action = "";
switch (action)
{
{
CURLMcode msta;
AsyncIO *IO = watcher->data;
+ IO->Now = ev_now(event_base);
EV_syslog(LOG_DEBUG, "EVENT Curl: %s\n", __FUNCTION__);
curl_slist_free_all(IO->HttpReq.headers);
static void QueueEventAddCallback(EV_P_ ev_async *w, int revents)
{
+ ev_tstamp Now;
HashList *q;
void *v;
HashPos*It;
q = InboundEventQueues[1];
}
pthread_mutex_unlock(&EventQueueMutex);
-
+ Now = ev_now (event_base);
It = GetNewHashPos(q, 0);
while (GetNextHashPos(q, It, &len, &Key, &v))
{
IOAddHandler *h = v;
- if (h->IO->ID == 0)
+ if (h->IO->ID == 0) {
h->IO->ID = EvIDSource++;
+ }
+ if (h->IO->StartIO == 0.0)
+ h->IO->StartIO = Now;
+ h->IO->Now = Now;
h->EvAttch(h->IO);
}
DeleteHashPos(&It);
static void DBQueueEventAddCallback(EV_P_ ev_async *w, int revents)
{
+ ev_tstamp Now;
HashList *q;
void *v;
HashPos *It;
}
pthread_mutex_unlock(&DBEventQueueMutex);
+ Now = ev_now (event_db);
It = GetNewHashPos(q, 0);
while (GetNextHashPos(q, It, &len, &Key, &v))
{
eNextState rc;
if (h->IO->ID == 0)
h->IO->ID = EvIDSource++;
+ if (h->IO->StartDB == 0.0)
+ h->IO->StartDB = Now;
+ h->IO->Now = Now;
rc = h->EvAttch(h->IO);
switch (rc)
{