From ec88c2b6045cbe16030e93569c130044fd59d397 Mon Sep 17 00:00:00 2001 From: Dmitry Simonenko <pmwkaa@gmail.com> Date: Thu, 19 May 2011 12:46:25 +0400 Subject: [PATCH] * tarantool_silverbox: admin console hangs if not recognized command Fix (Bug #716683). --- core/admin.c | 2 +- core/admin.rl | 2 +- test/lib/tarantool_admin.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/admin.c b/core/admin.c index ab1f5afc6d..d521a99158 100644 --- a/core/admin.c +++ b/core/admin.c @@ -1457,7 +1457,7 @@ case 107: if (p != pe) { start(out); - tbuf_append(out, unknown_command, sizeof(unknown_command)); + tbuf_append(out, unknown_command, sizeof(unknown_command) - 1); end(out); } diff --git a/core/admin.rl b/core/admin.rl index 1be63602a4..514b467a4f 100644 --- a/core/admin.rl +++ b/core/admin.rl @@ -203,7 +203,7 @@ admin_dispatch(void) if (p != pe) { start(out); - tbuf_append(out, unknown_command, sizeof(unknown_command)); + tbuf_append(out, unknown_command, sizeof(unknown_command) - 1); end(out); } diff --git a/test/lib/tarantool_admin.py b/test/lib/tarantool_admin.py index 9e2fffc6b7..4788002c29 100644 --- a/test/lib/tarantool_admin.py +++ b/test/lib/tarantool_admin.py @@ -40,11 +40,11 @@ class TarantoolAdmin(TarantoolConnection): if not buf: break res = res + buf; - if (res.rfind("...\r\n") >= 0): + if (res.rfind("\r\n...\r\n") >= 0): break # validate yaml by parsing it - # yaml.load(res) + yaml.load(res) if not noprint: print command.replace('\n', '') -- GitLab