/* only possible with non-ssl connections */
if (svr->connecting && (svr_try_connect_plain(svr) != ECORE_CON_CONNECTED))
- return;
+ return;
if (svr->handshaking)
{
DBG("Continuing ssl handshake");
if (!ecore_con_ssl_server_init(svr))
- lost_server = EINA_FALSE;
+ lost_server = EINA_FALSE;
}
-
+
if (!(svr->type & ECORE_CON_SSL))
{
num = read(svr->fd, buf, sizeof(buf));
/* 0 is not a valid return value for a tcp socket */
if ((num > 0) || ((num < 0) && (errno == EAGAIN)))
- lost_server = EINA_FALSE;
+ lost_server = EINA_FALSE;
}
else
{
if (num >= 0)
lost_server = EINA_FALSE;
}
-
+
if ((!svr->delete_me) && (num > 0))
- {
- Ecore_Con_Event_Server_Data *e;
-
- e = malloc(sizeof(Ecore_Con_Event_Server_Data));
- EINA_SAFETY_ON_NULL_RETURN(e);
-
- svr->event_count++;
- e->server = svr;
- e->data = malloc(num);
- if (!e->data)
- {
- ERR("alloc!");
- free(e);
- return;
- }
- memcpy(e->data, buf, num);
- e->size = num;
- ecore_event_add(ECORE_CON_EVENT_SERVER_DATA, e,
- _ecore_con_event_server_data_free, NULL);
- }
+ {
+ Ecore_Con_Event_Server_Data *e;
+
+ e = malloc(sizeof(Ecore_Con_Event_Server_Data));
+ EINA_SAFETY_ON_NULL_RETURN(e);
+
+ svr->event_count++;
+ e->server = svr;
+ e->data = malloc(num);
+ if (!e->data)
+ {
+ ERR("alloc!");
+ free(e);
+ return;
+ }
+ memcpy(e->data, buf, num);
+ e->size = num;
+ ecore_event_add(ECORE_CON_EVENT_SERVER_DATA, e,
+ _ecore_con_event_server_data_free, NULL);
+ }
if (lost_server)
- _ecore_con_server_kill(svr);
+ _ecore_con_server_kill(svr);
}
static Eina_Bool