CURLINFO_PRIVATE,
&chandle);
if (sta) {
- EVCURL_syslog(LOG_ERR,
- "error asking curl for private"
- " cookie of curl handle: %s\n",
- curl_easy_strerror(sta));
+ syslog(LOG_ERR,
+ "error asking curl for private"
+ " cookie of curl handle: %s\n",
+ curl_easy_strerror(sta));
continue;
}
IO = (AsyncIO *)chandle;
if (IO == NULL) {
sta = curl_easy_getinfo(easy, CURLINFO_PRIVATE, &f);
if (sta) {
- EVCURL_syslog(LOG_ERR,
- "EVCURL: error asking curl for private "
- "cookie of curl handle: %s\n",
- curl_easy_strerror(sta));
+ CURL_syslog(LOG_ERR,
+ "EVCURL: error asking curl for private "
+ "cookie of curl handle: %s\n",
+ curl_easy_strerror(sta));
return -1;
}
IO = (AsyncIO *) f;
HashList *QueueEvents = NULL;
HashList *InboundEventQueue = NULL;
HashList *InboundEventQueues[2] = { NULL, NULL };
+extern void ShutDownCLient(AsyncIO *IO);
ev_async AddJob;
ev_async ExitEventLoop;
static void QueueEventAddCallback(EV_P_ ev_async *w, int revents)
{
+ CitContext *Ctx;
ev_tstamp Now;
HashList *q;
void *v;
if (h->IO->StartIO == 0.0)
h->IO->StartIO = Now;
+ Ctx = h->IO->CitContext;
+ become_session(Ctx);
+
h->IO->Now = Now;
- h->EvAttch(h->IO);
+ switch (h->EvAttch(h->IO))
+ {
+ case eReadMore:
+ case eReadMessage:
+ case eReadFile:
+ case eSendReply:
+ case eSendMore:
+ case eReadPayload:
+ case eSendFile:
+ case eDBQuery:
+ case eSendDNSQuery:
+ case eReadDNSReply:
+ case eConnect:
+ break;
+ case eTerminateConnection:
+ case eAbort:
+ ShutDownCLient(h->IO);
+ break;
+ }
}
DeleteHashPos(&It);
DeleteHashContent(&q);
static void DBQueueEventAddCallback(EV_P_ ev_async *w, int revents)
{
+ CitContext *Ctx;
ev_tstamp Now;
HashList *q;
void *v;
if (h->IO->StartDB == 0.0)
h->IO->StartDB = Now;
h->IO->Now = Now;
+
+ Ctx = h->IO->CitContext;
+ become_session(Ctx);
ev_cleanup_start(event_db, &h->IO->db_abort_by_shutdown);
rc = h->EvAttch(h->IO);
switch (rc)