From: Dan Mick Date: Thu, 11 Jul 2013 00:17:43 +0000 (-0700) Subject: mon: Monitor: 'health detail --format=json' should only output JSON X-Git-Tag: v0.67-rc1~98 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=04fbc523cf07bb0e81d8f05dab67ba85747df2e9;p=ceph.git mon: Monitor: 'health detail --format=json' should only output JSON Fixes: #5526 Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index aafd2883e0a..f64b6b1b318 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1771,7 +1771,7 @@ void Monitor::get_health(string& status, bufferlist *detailbl, Formatter *f) while (!detail.empty()) { if (f) f->dump_string("item", detail.front().second); - if (detailbl != NULL) { + else if (detailbl != NULL) { detailbl->append(detail.front().second); detailbl->append('\n'); }