summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-17 18:14:37 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-17 18:18:12 +0900
commitaec79f9d0d94d2f4717d61dc8aec7f6da3a80606 (patch)
tree363c6f124936b83a679fe3fcb790daf2e3365eb7 /src/lib
parent192c7e35f6055d1588755cd23e4e2dc29470bc6e (diff)
efl net http - fix protocol error handling to not crash and handle it
if http server doesnt send even a valid http response and just closes your conenction... dont segv with null pd->cm @fix
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_con/efl_net_dialer_http.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c
index 4d64a20..cbc3e03 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.c
+++ b/src/lib/ecore_con/efl_net_dialer_http.c
@@ -1533,6 +1533,8 @@ _efl_net_dialer_http_pause_reset(Eo *o, Efl_Net_Dialer_Http_Data *pd)
1533 CURLMcode rm; 1533 CURLMcode rm;
1534 Eina_Error err; 1534 Eina_Error err;
1535 1535
1536 EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->cm == NULL, EALREADY);
1537
1536 re = curl_easy_pause(pd->easy, pd->pause); 1538 re = curl_easy_pause(pd->easy, pd->pause);
1537 if (re != CURLE_OK) 1539 if (re != CURLE_OK)
1538 { 1540 {
@@ -1654,6 +1656,11 @@ _efl_net_dialer_http_efl_io_writer_write(Eo *o, Efl_Net_Dialer_Http_Data *pd, Ei
1654 err = _efl_net_dialer_http_pause_reset(o, pd); 1656 err = _efl_net_dialer_http_pause_reset(o, pd);
1655 if (err) goto error; 1657 if (err) goto error;
1656 1658
1659 if (!pd->cm)
1660 {
1661 err = EISCONN;
1662 goto error;
1663 }
1657 pd->error = 0; 1664 pd->error = 0;
1658 rm = curl_multi_socket_action(pd->cm->multi, 1665 rm = curl_multi_socket_action(pd->cm->multi,
1659 pd->fd, 1666 pd->fd,