hammer2 - Fix nact assertion
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Aug 2012 20:05:58 +0000 (13:05 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Aug 2012 20:05:58 +0000 (13:05 -0700)
* An nact assertion was getting hit because of an assumption that
  the assertion caused not to be correct.  Fix the assumption.

sbin/hammer2/msg.c

index 8ca483d..a47d811 100644 (file)
@@ -1235,14 +1235,14 @@ hammer2_iocom_flush2(hammer2_iocom_t *iocom)
 
                if ((size_t)nact < hbytes - ioq->hbytes) {
                        ioq->hbytes += nact;
-                       /* nact = 0; */
+                       nact = 0;
                        break;
                }
                nact -= hbytes - ioq->hbytes;
                ioq->hbytes = hbytes;
                if ((size_t)nact < abytes - ioq->abytes) {
                        ioq->abytes += nact;
-                       /* nact = 0; */
+                       nact = 0;
                        break;
                }
                nact -= abytes - ioq->abytes;