From 1fb468f7cefdbd1fac102d29c20ea6ffc8302f36 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sat, 3 Feb 2018 18:38:48 +0000 Subject: [PATCH] Fix error in control protocol implementation in dinitctl/shutdown. --- src/dinitctl.cc | 2 +- src/shutdown.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dinitctl.cc b/src/dinitctl.cc index 014e8c2..8fa0ed9 100644 --- a/src/dinitctl.cc +++ b/src/dinitctl.cc @@ -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 diff --git a/src/shutdown.cc b/src/shutdown.cc index 4d4577f..c751fd0 100644 --- a/src/shutdown.cc +++ b/src/shutdown.cc @@ -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 -- 2.25.1