backport previous commit
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 6 Sep 2012 08:14:57 +0000 (08:14 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 6 Sep 2012 08:14:57 +0000 (08:14 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/branches/ecore-1.7@76231 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/ecore_con/ecore_con.c

index 2ca4aae..a5581cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * Fix race condition in ecore-con where events could sometimes be sent for freed clients
        * Fix ssl servers using openssl
+       * Fix ssl connections overall
index eb5249d..65e5779 100644 (file)
@@ -2135,7 +2135,7 @@ _ecore_con_svr_cl_read(Ecore_Con_Client *cl)
         _ecore_con_cl_timer_update(cl);
      }
 
-   if (!(cl->host_server->type & ECORE_CON_SSL) || (!cl->upgrade))
+   if (!(cl->host_server->type & ECORE_CON_SSL) && (!cl->upgrade))
      {
         num = read(cl->fd, buf, sizeof(buf));
         /* 0 is not a valid return value for a tcp socket */
@@ -2311,7 +2311,7 @@ _ecore_con_client_flush(Ecore_Con_Client *cl)
         if (!cl->buf) return;
         num = eina_binbuf_length_get(cl->buf) - cl->buf_offset;
         if (num <= 0) return;
-        if (!(cl->host_server->type & ECORE_CON_SSL) || (!cl->upgrade))
+        if (!(cl->host_server->type & ECORE_CON_SSL) && (!cl->upgrade))
           count = write(cl->fd, eina_binbuf_string_get(cl->buf) + cl->buf_offset, num);
         else
           count = ecore_con_ssl_client_write(cl, eina_binbuf_string_get(cl->buf) + cl->buf_offset, num);