Fix error in control protocol implementation in dinitctl/shutdown.
authorDavin McCall <davmac@davmac.org>
Sat, 3 Feb 2018 18:38:48 +0000 (18:38 +0000)
committerDavin McCall <davmac@davmac.org>
Sat, 3 Feb 2018 18:38:48 +0000 (18:38 +0000)
src/dinitctl.cc
src/shutdown.cc

index 014e8c24912e17c16a6c4ffac9523cf817a77a72..8fa0ed98f5a0555fce243719e6ee4400c58ca4eb 100644 (file)
@@ -82,7 +82,7 @@ static void wait_for_reply(cpbuffer<1024> &rbuffer, int fd)
     
     while (rbuffer[0] >= 100) {
         // Information packet; discard.
-        fillBufferTo(&rbuffer, fd, 1);
+        fillBufferTo(&rbuffer, fd, 2);
         int pktlen = (unsigned char) rbuffer[1];
         
         rbuffer.consume(1);  // Consume one byte so we'll read one byte of the next packet
index 4d4577ffbdee41ea8283f19cb1f9392968c36394..c751fd086fe422a3e9beb877a7cc3abb37aa84c4 100644 (file)
@@ -215,7 +215,7 @@ static void wait_for_reply(cpbuffer<1024> &rbuffer, int fd)
     
     while (rbuffer[0] >= 100) {
         // Information packet; discard.
-        fillBufferTo(&rbuffer, fd, 1);
+        fillBufferTo(&rbuffer, fd, 2);
         int pktlen = (unsigned char) rbuffer[1];
         
         rbuffer.consume(1);  // Consume one byte so we'll read one byte of the next packet