From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 498A76EC58; Thu, 5 Aug 2021 00:18:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 498A76EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628111938; bh=7wRLZXoq8vM9OEKF5iJQSmwXTC6pvKR9RXhj/T2TCMc=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=sRydClnwDr25Jt8pMPXXgYpuErHCIBDjlzMoT1odE+U7tMYFD5mMeZT5OC0jmJnRt PBjMNHLqOlqW8KnN7dX1WzVU02VGzXed9Zh+wadZ0GRxDuDBaQ+Xvtw8CgO4YLZEoi D2anzUahyhatYke7gL842B95hmXaRAq4G1vhBkzU= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B8BCA6EC58 for ; Thu, 5 Aug 2021 00:18:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B8BCA6EC58 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mBOHv-0001vV-Ry; Thu, 05 Aug 2021 00:18:56 +0300 To: Vladimir Davydov Cc: tarantool-patches@dev.tarantool.org References: <5bc68e715031c04ebb022c70cf4ff27c0939598c.1627024646.git.vdavydov@tarantool.org> <9dbecb42-b2c8-ff46-ef1c-c8c14f19357f@tarantool.org> <20210803154416.3zx5t4jkdyh7adhy@esperanza> <6d4d06a2-c1ea-bb3a-2b97-537d538b75e3@tarantool.org> <20210804135658.zcobwyz3rjcbwunu@esperanza> Message-ID: <1ac8acd1-f729-252d-65ff-d9041bea1694@tarantool.org> Date: Wed, 4 Aug 2021 23:18:55 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210804135658.zcobwyz3rjcbwunu@esperanza> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C366EE405EC28A2001F8302D8429E0DE58182A05F538085040B3FE872C2622A7D7EF2B9F27D2AE2209BD62BDA721FA5734342027E3F3D27E6F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73C696014E2DCCA1EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D07BBD2EBFB7BF888638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D81C65316A05DE34C3A119A3468CB863FC117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD186FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A45692FFBBD75A6A089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5A1B7B1EE5EFA305D494E8AC52F16261D3FFB7827C5F9FC07D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34FDC9529E4578B99CE748DEE3556F49151F2F2161DEDED3504CD519D5F19167C9187A5C557B86CFED1D7E09C32AA3244CD1CFDD2A3044CD2C909A82C642E1D0B8D08D48398F32B4A6729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojh4v93/7HD3X6aV7xM/Vb/g== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DF6667ED7014C155F16DD4732914307C43841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 13/20] net.box: rewrite send_and_recv_{iproto, console} in C X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the fixes! > diff --git a/src/box/lua/net_box.c b/src/box/lua/net_box.c > index 19289e750..6d6d09aca 100644 > --- a/src/box/lua/net_box.c > +++ b/src/box/lua/net_box.c <...> > + > +/** > + * Sends and receives data over an iproto connection. > + * Takes socket fd, send_buf (ibuf), recv_buf (ibuf), timeout. > + * On success returns header (table), body_rpos (char *), body_end (char *). > + * On error returns nil, error. > + */ > +static int > +netbox_send_and_recv_iproto(lua_State *L) > +{ > + int fd = lua_tointeger(L, 1); > + struct ibuf *send_buf = (struct ibuf *)lua_topointer(L, 2); > + struct ibuf *recv_buf = (struct ibuf *)lua_topointer(L, 3); > + double timeout = (!lua_isnoneornil(L, 4) ? > + lua_tonumber(L, 4) : TIMEOUT_INFINITY); Timeout is never passed to this function. It is always TIMEOUT_INFINITY. The same for netbox_send_and_recv_console.