]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "config: fix stringification of config values"
authorSage Weil <sage@inktank.com>
Thu, 15 Aug 2013 21:07:39 +0000 (14:07 -0700)
committerSage Weil <sage@inktank.com>
Thu, 15 Aug 2013 21:07:39 +0000 (14:07 -0700)
This reverts commit fefe0c602f78e66d35fd5806da4c2e4e154a267c.

I have a cleaner cleanup.

src/common/ceph_context.cc

index fcc3798c47a32d10eb63048253a5553ba99b0f8f..9602fdf2e40d8b92ebd1f1b3c93694e5796156a7 100644 (file)
@@ -198,10 +198,7 @@ void CephContext::do_command(std::string command, cmdmap_t& cmdmap,
       } else {
        // val may be multiple words
        ostringstream argss;
-       argss << *val.begin();
-       for (std::vector<std::string>::iterator i = val.begin() + 1; i != val.end(); ++i) {
-         argss << "," << *i;
-       }
+       std::copy(val.begin(), val.end(), ostream_iterator<string>(argss, " "));
         int r = _conf->set_val(var.c_str(), argss.str().c_str());
         if (r < 0) {
           f->dump_stream("error") << "error setting '" << var << "' to '" << val << "': " << cpp_strerror(r);