diff --git a/core/dcb.c b/core/dcb.c index 6db392d14..51fbef92b 100644 --- a/core/dcb.c +++ b/core/dcb.c @@ -35,6 +35,10 @@ * 28/06/13 Mark Riddoch Changed the free mechanism ti * introduce a zombie state for the * dcb + * 02/07/2013 Massimiliano Pinto Addition of delayqlock, delayq and authlock + * for handling backend asynchronous protocol connection + * and a generic lock for backend authentication + * * @endverbatim */ #include @@ -77,7 +81,10 @@ DCB *rval; return NULL; } spinlock_init(&rval->writeqlock); + spinlock_init(&rval->delayqlock); + spinlock_init(&rval->authlock); rval->writeq = NULL; + rval->delayq = NULL; rval->remote = NULL; rval->state = DCB_STATE_ALLOC; rval->next = NULL; diff --git a/include/dcb.h b/include/dcb.h index fe9047397..4f818039f 100644 --- a/include/dcb.h +++ b/include/dcb.h @@ -39,6 +39,9 @@ struct service; * 11/06/13 Mark Riddoch Updated GWPROTOCOL structure with new * entry points * 18/06/13 Mark Riddoch Addition of the listener entry point + * 02/06/2013 Massimiliano Pinto Addition of delayqlock, delayq and authlock + * for handling backend asynchronous protocol connection + * and a generic lock for backend authentication * * @endverbatim */ @@ -134,6 +137,7 @@ typedef struct dcb { GWBUF *writeq; /**< Write Data Queue */ SPINLOCK delayqlock; /**< Delay Backend Write Queue spinlock */ GWBUF *delayq; /**< Delay Backend Write Data Queue */ + SPINLOCK authlock; /**< Generic Authorization spinlock */ DCBSTATS stats; /**< DCB related statistics */