From d46dbd14269d932984783e7221054a54a55c9415 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 1 Sep 2011 16:40:27 +0000 Subject: [PATCH] Queue functions have to return eNextState in order for the caller to i.e. swap successfully between queus. --- citadel/event_client.c | 8 ++++---- citadel/event_client.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/citadel/event_client.c b/citadel/event_client.c index c266c2d54..669a0e0ae 100644 --- a/citadel/event_client.c +++ b/citadel/event_client.c @@ -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) diff --git a/citadel/event_client.h b/citadel/event_client.h index 99739e033..cb833e068 100644 --- a/citadel/event_client.h +++ b/citadel/event_client.h @@ -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, -- 2.30.2