From a4e8cb53f11999ad286e85dfae2976f7b6cd258c Mon Sep 17 00:00:00 2001
From: Konstantin Osipov <kostja@tarantool.org>
Date: Thu, 14 Sep 2017 22:55:24 +0300
Subject: [PATCH] iproto: gh-946, split iobuf, minor fix

---
 src/box/iproto.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/box/iproto.cc b/src/box/iproto.cc
index 7582425500..6764ca5dc4 100644
--- a/src/box/iproto.cc
+++ b/src/box/iproto.cc
@@ -721,6 +721,7 @@ iproto_decode_msg(struct iproto_msg *msg, const char **pos, const char *reqend,
 static inline void
 iproto_enqueue_batch(struct iproto_connection *con, struct ibuf *in)
 {
+	struct obuf *p_obuf = iproto_connection_output_by_input(con, con->p_ibuf);
 	int n_requests = 0;
 	bool stop_input = false;
 	while (con->parse_size && stop_input == false) {
@@ -739,8 +740,7 @@ iproto_enqueue_batch(struct iproto_connection *con, struct ibuf *in)
 			break;
 		struct iproto_msg *msg = iproto_msg_new(con);
 		msg->p_ibuf = con->p_ibuf;
-		msg->p_obuf =
-			iproto_connection_output_by_input(con, con->p_ibuf);
+		msg->p_obuf = p_obuf;
 		auto guard = make_scoped_guard([=] { iproto_msg_delete(msg); });
 
 		msg->len = reqend - reqstart; /* total request length */
-- 
GitLab