gwbuf_consume is protected by spinlock

This commit is contained in:
Massimiliano Pinto
2013-10-24 17:53:38 +02:00
parent 241a0a6175
commit 2cbe46b506
2 changed files with 16 additions and 3 deletions

View File

@ -760,7 +760,6 @@ dcb_write(DCB *dcb, GWBUF *queue)
dcb->stats.n_buffered++;
}
} /* if (dcb->writeq) */
spinlock_release(&dcb->writeqlock);
if (saved_errno != 0 &&
queue != NULL &&
@ -774,8 +773,11 @@ dcb_write(DCB *dcb, GWBUF *queue)
dcb_isclient(dcb) ? "client" : "backend server",
saved_errno,
strerror(saved_errno));
spinlock_release(&dcb->writeqlock);
return 0;
}
spinlock_release(&dcb->writeqlock);
return 1;
}