summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--action.c2
-rw-r--r--runtime/batch.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/action.c b/action.c
index 8a3d8920..9c06f61e 100644
--- a/action.c
+++ b/action.c
@@ -1658,7 +1658,7 @@ doSubmitToActionQNotAllMarkBatch(action_t *pAction, batch_t *pBatch)
copyActive(pBatch);
for(i = 0 ; i < batchNumMsgs(pBatch) ; ++i) {
- if(!pBatch->active[i])
+ if((pBatch->pElem[i].state == BATCH_STATE_DISC) || !pBatch->active[i])
continue;
if(now == 0) {
now = datetime.GetTime(NULL); /* good time call - the only one done */
diff --git a/runtime/batch.h b/runtime/batch.h
index fdacb8e2..f743c188 100644
--- a/runtime/batch.h
+++ b/runtime/batch.h
@@ -129,8 +129,8 @@ batchSetElemState(batch_t *pBatch, int i, batch_state_t newState) {
*/
static inline int
batchIsValidElem(batch_t *pBatch, int i) {
- return( (pBatch->active == NULL || pBatch->active[i])
- && pBatch->pElem[i].state != BATCH_STATE_DISC);
+ return( (pBatch->pElem[i].state != BATCH_STATE_DISC)
+ && (pBatch->active == NULL || pBatch->active[i]));
}