{
public:
Buffer(char *b) : b_(b) {}
- ~Buffer() { free(b_); }
+ ~Buffer() { if (b_) free(b_); }
char* buf() { return b_; }
private:
char *b_;
if (pinged == false)
{
- Error << "ping(" << _app.pid() << ") wait: " << this_wait << " " << hostname() << ":" << port() << " run:" << _running << " " << error();
+#if 0
+ Error << "Failed to ping(" << _app.pid() << ") wait: " << this_wait << " " << hostname() << ":" << port() << " run:" << _running << " " << error();
+#endif
// If we happen to have a pid file, lets try to kill it
if ((pid_file().empty() == false) and (access(pid_file().c_str(), R_OK) == 0))
for (Options::const_iterator iter= _options.begin(); iter != _options.end(); ++iter)
{
- if ((*iter).second.empty() == false)
- {
- app.add_option((*iter).first, (*iter).second);
- }
- else
+ if ((*iter).first.empty() == false)
{
- app.add_option((*iter).first);
+ if ((*iter).second.empty() == false)
+ {
+ app.add_option((*iter).first, (*iter).second);
+ }
+ else
+ {
+ app.add_option((*iter).first);
+ }
}
}