{
CitContext* CCC = IO->CitContext;
- memcpy(CCC->lastcmdname, IOStates[State].Key, IOStates[State].len + 1);
+ if (CCC != NULL)
+ memcpy(CCC->lastcmdname, IOStates[State].Key, IOStates[State].len + 1);
}
return eSendReply;
}
+eNextState EventQueueDBOperation(AsyncIO *IO, IO_CallBack CB)
+{
+ StopClientWatchers(IO, 0);
+ return QueueDBOperation(IO, CB);
+}
+eNextState DBQueueEventContext(AsyncIO *IO, IO_CallBack CB)
+{
+ StopDBWatchers(IO);
+ return QueueEventContext(IO, CB);
+}
+
extern eNextState evcurl_handle_start(AsyncIO *IO);
eNextState QueueCurlContext(AsyncIO *IO)
return eSendReply;
}
+eNextState CurlQueueDBOperation(AsyncIO *IO, IO_CallBack CB)
+{
+ StopCurlWatchers(IO);
+ return QueueDBOperation(IO, CB);
+}
+
+
void DestructCAres(AsyncIO *IO);
void FreeAsyncIOContents(AsyncIO *IO)
{
ev_io_stop(event_base, &IO->send_event);
ev_io_stop(event_base, &IO->recv_event);
+ curl_easy_cleanup(IO->HttpReq.chnd);
+ IO->HttpReq.chnd = NULL;
+
if (IO->SendBuf.fd != 0) {
close(IO->SendBuf.fd);
}