From: Sage Weil Date: Tue, 5 Oct 2010 22:37:39 +0000 (-0700) Subject: config: fix address list parsing X-Git-Tag: v0.22~51^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ed2eee54e68c4dd96e8e323b1f0f93d29aec061d;p=ceph.git config: fix address list parsing Skip past comma, whitespace. Signed-off-by: Sage Weil --- diff --git a/src/config.cc b/src/config.cc index 412670a126793..cc7df278903a1 100644 --- a/src/config.cc +++ b/src/config.cc @@ -178,9 +178,15 @@ bool parse_ip_port_vec(const char *s, vector& vec) const char *end = p + strlen(p); while (p < end) { entity_addr_t a; - if (!a.parse(p, &p)) + //cout << " parse at '" << p << "'" << std::endl; + if (!a.parse(p, &p)) { + //dout(0) << " failed to parse address '" << p << "'" << dendl; return false; + } + //cout << " got " << a << ", rest is '" << p << "'" << std::endl; vec.push_back(a); + while (*p == ',' || *p == ' ') + p++; } return true; }