summaryrefslogtreecommitdiff
path: root/legacy/ecore/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-11-28 07:27:45 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-11-28 07:27:45 +0000
commit8e1c6b2bb3c6df51e67f1ea67f8530733cf20803 (patch)
tree4bf8d7a705f268e07283c21a0b2e9946cc247d77 /legacy/ecore/src
parent3ca4079e075fe15de01034e6a1ab89ecfd51d6bb (diff)
ecore: fix bugs reported and identified by Aharone and Daniel.
SVN revision: 79766
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con_eet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_eet.c b/legacy/ecore/src/lib/ecore_con/ecore_con_eet.c
index 3a958f3663..840a6df4eb 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con_eet.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con_eet.c
@@ -312,7 +312,7 @@ _ecore_con_eet_data(Ecore_Con_Reply *n, void *data, unsigned int size)
312 else if (eet_connection_empty(n->econn) && size > (int) (4 * sizeof (unsigned int) + 2)) 312 else if (eet_connection_empty(n->econn) && size > (int) (4 * sizeof (unsigned int) + 2))
313 { 313 {
314 unsigned int *tmp = data; 314 unsigned int *tmp = data;
315 size -= 4 * sizeof (unsigned int) + 2; 315 size -= 4 * sizeof (unsigned int);
316 316
317 if (ntohl(tmp[0]) == ECORE_CON_EET_RAW_MAGIC) 317 if (ntohl(tmp[0]) == ECORE_CON_EET_RAW_MAGIC)
318 { 318 {
@@ -340,7 +340,7 @@ _ecore_con_eet_data(Ecore_Con_Reply *n, void *data, unsigned int size)
340 n->buffer_length = data_length; 340 n->buffer_length = data_length;
341 n->buffer_current = 0; 341 n->buffer_current = 0;
342 if (n->buffer_handler) 342 if (n->buffer_handler)
343 n->buffer = malloc(sizeof (data_length)); 343 n->buffer = malloc(sizeof (char) * data_length);
344 else 344 else
345 n->buffer = (void*) 1; 345 n->buffer = (void*) 1;
346 if (n->buffer) 346 if (n->buffer)
@@ -355,7 +355,7 @@ _ecore_con_eet_data(Ecore_Con_Reply *n, void *data, unsigned int size)
355 } 355 }
356 } 356 }
357 357
358 size += 4 * sizeof (unsigned int) + 2; 358 size += 4 * sizeof (unsigned int);
359 } 359 }
360 360
361 eet_connection_received(n->econn, data, size); 361 eet_connection_received(n->econn, data, size);
@@ -468,7 +468,7 @@ ecore_con_eet_server_new(Ecore_Con_Server *server)
468 r->handler_data = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA, 468 r->handler_data = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA,
469 (Ecore_Event_Handler_Cb)_ecore_con_eet_server_data, r); 469 (Ecore_Event_Handler_Cb)_ecore_con_eet_server_data, r);
470 r->data_callbacks = eina_hash_stringshared_new(_ecore_con_eet_data_free); 470 r->data_callbacks = eina_hash_stringshared_new(_ecore_con_eet_data_free);
471 r->raw_data_callbacks = eina_hash_stringshared_new(_ecore_con_eet_raw_data_free); 471 r->raw_data_callbacks = eina_hash_superfast_new(_ecore_con_eet_raw_data_free);
472 472
473 _ecore_con_eet_data_descriptor_setup(r); 473 _ecore_con_eet_data_descriptor_setup(r);
474 474
@@ -494,7 +494,7 @@ ecore_con_eet_client_new(Ecore_Con_Server *server)
494 r->handler_data = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA, 494 r->handler_data = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
495 (Ecore_Event_Handler_Cb)_ecore_con_eet_client_data, r); 495 (Ecore_Event_Handler_Cb)_ecore_con_eet_client_data, r);
496 r->data_callbacks = eina_hash_stringshared_new(_ecore_con_eet_data_free); 496 r->data_callbacks = eina_hash_stringshared_new(_ecore_con_eet_data_free);
497 r->raw_data_callbacks = eina_hash_stringshared_new(_ecore_con_eet_raw_data_free); 497 r->raw_data_callbacks = eina_hash_superfast_new(_ecore_con_eet_raw_data_free);
498 498
499 _ecore_con_eet_data_descriptor_setup(r); 499 _ecore_con_eet_data_descriptor_setup(r);
500 500
@@ -658,7 +658,7 @@ ecore_con_eet_client_disconnect_callback_add(Ecore_Con_Eet *ece, Ecore_Con_Eet_C
658 c->func = func; 658 c->func = func;
659 c->data = data; 659 c->data = data;
660 660
661 ece->u.server.client_connect_callbacks = eina_list_append(ece->u.server.client_disconnect_callbacks, c); 661 ece->u.server.client_disconnect_callbacks = eina_list_append(ece->u.server.client_disconnect_callbacks, c);
662} 662}
663 663
664EAPI void 664EAPI void
@@ -805,7 +805,7 @@ ecore_con_eet_raw_send(Ecore_Con_Reply *reply, const char *protocol_name, const
805 size = sizeof (protocol) + protocol_length + section_length; 805 size = sizeof (protocol) + protocol_length + section_length;
806 tmp = alloca(size); 806 tmp = alloca(size);
807 memcpy(tmp, protocol, sizeof (protocol)); 807 memcpy(tmp, protocol, sizeof (protocol));
808 memcpy(tmp + sizeof (protocol), protocol, protocol_length); 808 memcpy(tmp + sizeof (protocol), protocol_name, protocol_length);
809 memcpy(tmp + sizeof (protocol) + protocol_length, section, section_length); 809 memcpy(tmp + sizeof (protocol) + protocol_length, section, section_length);
810 810
811 if (reply->client) 811 if (reply->client)