X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fcontext.c;h=6c6a20453c214e7d5dad07d10923a5f35c75c24e;hb=076aaf225bd8a8713cb16c99463f46518e20f118;hp=38394b7f44e05484960faa26f4fd21e984154f1a;hpb=6aa2397222e8eb94b061034d07f36a56d09873b9;p=citadel.git diff --git a/citadel/context.c b/citadel/context.c index 38394b7f4..6c6a20453 100644 --- a/citadel/context.c +++ b/citadel/context.c @@ -586,4 +586,16 @@ INLINE void become_session(CitContext *which_con) { } - +/* + * Set the "async waiting" flag for a session, if applicable + */ +void set_async_waiting(struct CitContext *ccptr) +{ + CtdlLogPrintf(CTDL_DEBUG, "Setting async_waiting flag for session %d\n", ccptr->cs_pid); + if (ccptr->is_async) { + ccptr->async_waiting = 1; + if (ccptr->state == CON_IDLE) { + ccptr->state = CON_READY; + } + } +}