From f15dfbb33ba9771fb342a0cb137a2f1ad83e14e1 Mon Sep 17 00:00:00 2001 From: deffpuzzl Date: Thu, 21 Jun 2018 23:27:52 +0800 Subject: [PATCH] Release 1.2.4 --- src/queue.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/queue.c b/src/queue.c index a293937..b800f47 100644 --- a/src/queue.c +++ b/src/queue.c @@ -57,13 +57,18 @@ long _lDeleteQueue(SATvm *pstSavm, void *pvAddr) continue; pstSavm->m_lEffect ++; + SET_DATA_TRUCK(pstTruck, DATA_TRUCK_NULL); if(0 > (int)__sync_sub_and_fetch(&pv->m_lValid, 1)) { __sync_fetch_and_add(&pv->m_lValid, 1); break; } + } - SET_DATA_TRUCK(pstTruck, DATA_TRUCK_NULL); + if(0 == pstSavm->m_lEffect) + { + pstSavm->m_lErrno = NO_DATA_FOUND; + return RC_FAIL; } return RC_SUCC;