#include <Ecore_Con.h>
#define CLIENT_COUNT 2
+#define SERVER_COUNT 2
static char sdata[] = "Server_info";
static char cdata[] = "Client_info";
static Eina_Bool server_upgraded = EINA_FALSE;
static Eina_Bool client_upgraded = EINA_FALSE;
static int added_client_count = 0;
+static int added_server_count = 0;
static Eina_Bool wait_client = EINA_FALSE;
+static Eina_Bool wait_server = EINA_FALSE;
static Eina_Bool
_server_error(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
}
ecore_con_server_flush(event->server);
+
+ added_server_count++;
+ if (wait_server && (added_server_count == SERVER_COUNT))
+ {
+ wait_server = EINA_FALSE;
+ ecore_main_loop_quit();
+ }
}
return ECORE_CALLBACK_RENEW;
ecore_main_loop_begin();
+ if (added_server_count != SERVER_COUNT)
+ {
+ wait_server = EINA_TRUE;
+ ecore_main_loop_begin();
+ }
+
if (ecore_con_server_fd_get(client) == -1)
{
ecore_con_server_del(server);