From 9d557a97ed667db6aa8e8dbe0703a1a8aee29a12 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 16 Feb 2020 19:05:09 +0800 Subject: [PATCH] crimson/admin: no need to check for '\n' as we don't need to mimic the behavior of classic OSD, what we need to to fulfill the needs of ceph cli. see `admin_socket()` in `src/pybind/ceph_daemon.py`, which sends a `\0` to indicate the end of a command. Signed-off-by: Kefu Chai --- src/crimson/admin/admin_socket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/admin/admin_socket.cc b/src/crimson/admin/admin_socket.cc index d89a0918890c..2d0131c3f887 100644 --- a/src/crimson/admin/admin_socket.cc +++ b/src/crimson/admin/admin_socket.cc @@ -168,7 +168,7 @@ struct line_consumer { size_t consumed = 0; for (auto c : buf) { consumed++; - if (c == '\0' || c == '\n') { + if (c == '\0') { buf.trim_front(consumed); return seastar::make_ready_future( consumption_result_type::stop_consuming_type(std::move(buf))); -- 2.47.3