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.
This commit is contained in:
@ -261,8 +261,9 @@ dcb_final_free(DCB *dcb)
|
|||||||
DCB_CALLBACK *cb;
|
DCB_CALLBACK *cb;
|
||||||
|
|
||||||
CHK_DCB(dcb);
|
CHK_DCB(dcb);
|
||||||
ss_info_dassert(dcb->state == DCB_STATE_DISCONNECTED,
|
ss_info_dassert(dcb->state == DCB_STATE_DISCONNECTED ||
|
||||||
"dcb not in DCB_STATE_DISCONNECTED state.");
|
dcb->state == DCB_STATE_ALLOC,
|
||||||
|
"dcb not in DCB_STATE_DISCONNECTED not in DCB_STATE_ALLOC state.");
|
||||||
|
|
||||||
/*< First remove this DCB from the chain */
|
/*< First remove this DCB from the chain */
|
||||||
spinlock_acquire(&dcbspin);
|
spinlock_acquire(&dcbspin);
|
||||||
|
@ -227,7 +227,6 @@ typedef struct dcb {
|
|||||||
struct service *service; /**< The related service */
|
struct service *service; /**< The related service */
|
||||||
void *data; /**< Specific client data */
|
void *data; /**< Specific client data */
|
||||||
DCBMM memdata; /**< The data related to DCB memory management */
|
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 */
|
SPINLOCK cb_lock; /**< The lock for the callbacks linked list */
|
||||||
DCB_CALLBACK *callbacks; /**< The list of callbacks for the DCB */
|
DCB_CALLBACK *callbacks; /**< The list of callbacks for the DCB */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user