Loading sld/trunk/src/daemon.cc +4 −3 Original line number Diff line number Diff line Loading @@ -124,8 +124,9 @@ SLDaemon::Options SLDaemon::getoptions(const string file) const { while (!fs.eof()) { fs.getline(line, MAX_CONF_LINE_SIZE); // if (fs.eof()) // break; if (fs.eof()) break; ++i; sscanf(line, "%10[^=]=%2039s\n", name, value); //TODO: fix magic number if (!strcasecmp(name, "host")) Loading @@ -143,7 +144,7 @@ SLDaemon::Options SLDaemon::getoptions(const string file) const { else if (!strcasecmp(name, "retrydelay")) o.retrydelay = atoi(value); else std::cerr << "Invalid line " << i << ": " << line; std::cerr << "Invalid line " << i << ": " << line << std::endl; } fs.close(); Loading Loading
sld/trunk/src/daemon.cc +4 −3 Original line number Diff line number Diff line Loading @@ -124,8 +124,9 @@ SLDaemon::Options SLDaemon::getoptions(const string file) const { while (!fs.eof()) { fs.getline(line, MAX_CONF_LINE_SIZE); // if (fs.eof()) // break; if (fs.eof()) break; ++i; sscanf(line, "%10[^=]=%2039s\n", name, value); //TODO: fix magic number if (!strcasecmp(name, "host")) Loading @@ -143,7 +144,7 @@ SLDaemon::Options SLDaemon::getoptions(const string file) const { else if (!strcasecmp(name, "retrydelay")) o.retrydelay = atoi(value); else std::cerr << "Invalid line " << i << ": " << line; std::cerr << "Invalid line " << i << ": " << line << std::endl; } fs.close(); Loading