net: lib: http: fix check for invalid body_start pointer
Recent commit fb7f6cfa ("net: lib: http: Fix invalid pointer body_start") introduced logic to reset the response body_start pointer when the response buffer was reused. This check needs to be fixed so that it doesn't arbitrarily change body_start when not needed. The problem with the current check can be demonstrated by not setting a response callback for request which generates a large response spanning multiple packets. In this case body_start is still valid (not reusing the response buffer because there is no callback set), but it will be changed when the 2nd packet is received and the "at" marker is located at the head of the new packet (!= response_buffer). Signed-off-by:Michael Scott <michael.scott@linaro.org>
Loading
Please sign in to comment