EV: stop all watchers before going into other queues - so we can avoid race conditions.
[citadel.git] / citadel / event_client.c
index 68995ddf7153401a26f8aa7222285959b33f16ca..c9c149f8e156fa002493565a05943d27fd2e7233 100644 (file)
@@ -295,6 +295,17 @@ eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB)
        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)
@@ -334,6 +345,13 @@ 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)
 {