Queue functions have to return eNextState in order for the caller to i.e. swap succes...
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 1 Sep 2011 16:40:27 +0000 (16:40 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 1 Sep 2011 16:40:27 +0000 (16:40 +0000)
citadel/event_client.c
citadel/event_client.h

index c266c2d542e6b8cc04fa1f03fee8dec18907e40b..669a0e0aec6c76cfbde6d729aa9aa40f7067a890 100644 (file)
@@ -87,7 +87,7 @@ extern struct ev_loop *event_db;
 extern ev_async DBAddJob;   
 extern ev_async DBExitEventLoop;
 
-int QueueDBOperation(AsyncIO *IO, IO_CallBack CB)
+eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB)
 {
        IOAddHandler *h;
        int i;
@@ -108,7 +108,7 @@ int QueueDBOperation(AsyncIO *IO, IO_CallBack CB)
 
        ev_async_send (event_db, &DBAddJob);
        CtdlLogPrintf(CTDL_DEBUG, "DBEVENT Q Done.\n");
-       return 0;
+       return eDBQuery;
 }
 
 void ShutDownDBCLient(AsyncIO *IO)
@@ -177,7 +177,7 @@ extern ev_async AddJob;
 extern ev_async ExitEventLoop;
 
 
-int QueueEventContext(AsyncIO *IO, IO_CallBack CB)
+eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB)
 {
        IOAddHandler *h;
        int i;
@@ -198,7 +198,7 @@ int QueueEventContext(AsyncIO *IO, IO_CallBack CB)
 
        ev_async_send (event_base, &AddJob);
        CtdlLogPrintf(CTDL_DEBUG, "EVENT Q Done.\n");
-       return 0;
+       return eSendReply;
 }
 
 int ShutDownEventQueue(void)
index 99739e0332d26ffc731988070bbcbc57c367477f..cb833e0683c6cdc7e45d7ebb13be51445e1e9630 100644 (file)
@@ -133,8 +133,8 @@ typedef struct _IOAddHandler {
 void FreeAsyncIOContents(AsyncIO *IO);
 
 eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB);
-int QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
-int QueueEventContext(AsyncIO *IO, IO_CallBack CB);
+eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
+eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB);
 int ShutDownEventQueue(void);
 
 eNextState InitEventIO(AsyncIO *IO,