From: discomfitor Date: Thu, 8 Dec 2011 16:08:33 +0000 (+0000) Subject: more binbuf_manage_new! X-Git-Tag: accepted/2.0/20130306.224007~87^2~154 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4eae35229ea76932a3b65fa5d15575da68fbeadf;p=profile%2Fivi%2Fecore.git more binbuf_manage_new! git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@66038 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_con/ecore_con_socks.c b/src/lib/ecore_con/ecore_con_socks.c index d44c1f5..21f199a 100644 --- a/src/lib/ecore_con/ecore_con_socks.c +++ b/src/lib/ecore_con/ecore_con_socks.c @@ -103,9 +103,9 @@ ecore_con_socks_read(Ecore_Con_Server *svr, unsigned char *buf, int num) DBG("SOCKS: %d bytes", num); if (num < 8) { - if (!svr->ecs_recvbuf) svr->ecs_recvbuf = eina_binbuf_new(); + if (!svr->ecs_recvbuf) svr->ecs_recvbuf = eina_binbuf_manage_new_length(buf, num); + else eina_binbuf_append_length(svr->ecs_recvbuf, buf, num); if (!svr->ecs_recvbuf) goto error; - eina_binbuf_append_length(svr->ecs_recvbuf, buf, num); /* the slowest connection on earth */ if (eina_binbuf_length_get(svr->ecs_recvbuf) != 8) return; data = eina_binbuf_string_get(svr->ecs_recvbuf);