From: discomfitor Date: Thu, 8 Dec 2011 16:08:33 +0000 (+0000) Subject: more binbuf_manage_new! X-Git-Tag: build/2012-07-04.173327~599 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1c5c9e646d6f1abe1fe78cf67b58bcf1e9e9248;p=profile%2Fivi%2Fecore.git more binbuf_manage_new! git-svn-id: http://svn.enlightenment.org/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);