From: James Turner Date: Wed, 24 Aug 2011 09:30:27 +0000 (-0700) Subject: Fix a release build issue, meaning of IDLE state was overloaded, add an explicit... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3753d5099251e2e1f653939c323f11762dafb721;p=simgear.git Fix a release build issue, meaning of IDLE state was overloaded, add an explicit state when we're waiting for the response start. --- diff --git a/simgear/io/HTTPClient.cxx b/simgear/io/HTTPClient.cxx index 96ef25bd..fb1b812f 100644 --- a/simgear/io/HTTPClient.cxx +++ b/simgear/io/HTTPClient.cxx @@ -100,7 +100,7 @@ public: } activeRequest = r; - state = STATE_IDLE; + state = STATE_SENT_REQUEST; bodyTransferSize = -1; chunkedTransfer = false; setTerminator("\r\n"); @@ -146,7 +146,7 @@ public: virtual void foundTerminator(void) { switch (state) { - case STATE_IDLE: + case STATE_SENT_REQUEST: activeRequest->responseStart(buffer); state = STATE_GETTING_HEADERS; buffer.clear(); @@ -170,6 +170,7 @@ public: state = STATE_GETTING_CHUNKED; break; + case STATE_GETTING_TRAILER: processTrailer(); buffer.clear(); @@ -354,6 +355,7 @@ private: enum ConnectionState { STATE_IDLE = 0, + STATE_SENT_REQUEST, STATE_GETTING_HEADERS, STATE_GETTING_BODY, STATE_GETTING_CHUNKED,