freecwmp
[Top] [All Lists]

[PATCH] [resend] check curl error code in http_send_message

To: freecwmp@linux-mips.org
Subject: [PATCH] [resend] check curl error code in http_send_message
From: Kaspar Schleiser <kaspar@schleiser.de>
Date: Wed, 11 Apr 2012 14:55:16 +0200
Cc: Kaspar Schleiser <kaspar@schleiser.de>
Original-recipient: rfc822;freecwmp@linux-mips.org
Sender: freecwmp-bounce@linux-mips.org
Hi,

last patch was borked, sorry for the noise.

This adds a trivial curl error result check.

Cheers

Signed-off-by: Kaspar Schleiser <kaspar@schleiser.de>
---
 src/http/http.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/http/http.c b/src/http/http.c
index 255cf45..bbf20c6 100644
--- a/src/http/http.c
+++ b/src/http/http.c
@@ -247,6 +247,10 @@ http_send_message(char *msg_out, char **msg_in)
        }
 
        curl_easy_cleanup(curl);
+       
+       if (res)
+               goto error;
+
 #endif /* HTTP_CURL */
 
 #ifdef HTTP_ZSTREAM
-- 
1.7.9.5


<Prev in Thread] Current Thread [Next in Thread>