From c30e270768de79bdfcd9ebeb7fb4a9b1e07a164d Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Tue, 24 Jun 2014 21:56:15 +0300 Subject: [PATCH] Removed dcb->command from DCB structure as it was used for session commands but not anymore. Corrected debug assertion in dcb_final_free because DCB can be freed also when DCB is being created, that is, state is DCB_STATE_ALLOC. --- server/core/dcb.c | 5 +++-- server/include/dcb.h | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/core/dcb.c b/server/core/dcb.c index 591013cf4..9c58748bf 100644 --- a/server/core/dcb.c +++ b/server/core/dcb.c @@ -261,8 +261,9 @@ dcb_final_free(DCB *dcb) DCB_CALLBACK *cb; CHK_DCB(dcb); - ss_info_dassert(dcb->state == DCB_STATE_DISCONNECTED, - "dcb not in DCB_STATE_DISCONNECTED state."); + ss_info_dassert(dcb->state == DCB_STATE_DISCONNECTED || + dcb->state == DCB_STATE_ALLOC, + "dcb not in DCB_STATE_DISCONNECTED not in DCB_STATE_ALLOC state."); /*< First remove this DCB from the chain */ spinlock_acquire(&dcbspin); diff --git a/server/include/dcb.h b/server/include/dcb.h index 7b119c220..99073c1db 100644 --- a/server/include/dcb.h +++ b/server/include/dcb.h @@ -227,7 +227,6 @@ typedef struct dcb { struct service *service; /**< The related service */ void *data; /**< Specific client data */ DCBMM memdata; /**< The data related to DCB memory management */ - int command; /**< Specific client command type */ SPINLOCK cb_lock; /**< The lock for the callbacks linked list */ DCB_CALLBACK *callbacks; /**< The list of callbacks for the DCB */