Previously this repeated the address of the first monitor.
Fixes: #2152
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Sage Weil <sage@newdream.net>
map<string, entity_addr_t>::const_iterator it = monmap.mon_addr.begin();
ostringstream oss;
- for (size_t i = 0; i < monmap.mon_addr.size(); ++i) {
+ for (size_t i = 0; i < monmap.mon_addr.size(); ++i, ++it) {
oss << it->second.addr;
if (i + 1 < monmap.mon_addr.size())
oss << ",";