From 3753d5099251e2e1f653939c323f11762dafb721 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 24 Aug 2011 02:30:27 -0700 Subject: [PATCH] Fix a release build issue, meaning of IDLE state was overloaded, add an explicit state when we're waiting for the response start. --- simgear/io/HTTPClient.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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, -- 2.39.5