summaryrefslogtreecommitdiff
path: root/src/examples/ecore/ecore_con_server_simple_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/ecore/ecore_con_server_simple_example.c')
-rw-r--r--src/examples/ecore/ecore_con_server_simple_example.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/examples/ecore/ecore_con_server_simple_example.c b/src/examples/ecore/ecore_con_server_simple_example.c
index 3c46ea2965..e61275785c 100644
--- a/src/examples/ecore/ecore_con_server_simple_example.c
+++ b/src/examples/ecore/ecore_con_server_simple_example.c
@@ -53,13 +53,14 @@ _del(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Client_Del *e
53 client = ecore_con_client_data_get(ev->client); 53 client = ecore_con_client_data_get(ev->client);
54 54
55 printf("Lost client with ip %s!\n", ecore_con_client_ip_get(ev->client)); 55 printf("Lost client with ip %s!\n", ecore_con_client_ip_get(ev->client));
56 printf("Total data received from this client: %d\n", client->sdata); 56 if (client)
57 {
58 printf("Total data received from this client: %d\n", client->sdata);
59 free(client);
60 }
57 printf("Client was connected for %0.3f seconds.\n", 61 printf("Client was connected for %0.3f seconds.\n",
58 ecore_con_client_uptime_get(ev->client)); 62 ecore_con_client_uptime_get(ev->client));
59 63
60 if (client)
61 free(client);
62
63 ecore_con_client_del(ev->client); 64 ecore_con_client_del(ev->client);
64 65
65 return ECORE_CALLBACK_RENEW; 66 return ECORE_CALLBACK_RENEW;