~d-ci/libmemcached/pushtest

« back to all changes in this revision

Viewing changes to libtest/server.cc

  • Committer: Continuous Integration
  • Date: 2013-01-11 08:26:12 UTC
  • mfrom: (1093.2.1 workspace)
  • Revision ID: ci@tangent.org-20130111082612-x0lmcxb58t9g1mpo
Merge lp:~tangent-org/libmemcached/1.2-build/ Build: jenkins-Libmemcached-195

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
{
99
99
public:
100
100
  Buffer(char *b) : b_(b) {}
101
 
   ~Buffer() { free(b_); }
 
101
   ~Buffer() { if (b_) free(b_); }
102
102
  char* buf() { return b_; }
103
103
private:
104
104
  char *b_;
295
295
 
296
296
  if (pinged == false)
297
297
  {
298
 
    Error << "ping(" << _app.pid() << ") wait: " << this_wait << " " << hostname() << ":" << port() << " run:" << _running << " " << error();
 
298
#if 0
 
299
    Error << "Failed to ping(" << _app.pid() << ") wait: " << this_wait << " " << hostname() << ":" << port() << " run:" << _running << " " << error();
 
300
#endif
299
301
 
300
302
    // If we happen to have a pid file, lets try to kill it
301
303
    if ((pid_file().empty() == false) and (access(pid_file().c_str(), R_OK) == 0))
480
482
 
481
483
  for (Options::const_iterator iter= _options.begin(); iter != _options.end(); ++iter)
482
484
  {
483
 
    if ((*iter).second.empty() == false)
484
 
    {
485
 
      app.add_option((*iter).first, (*iter).second);
486
 
    }
487
 
    else
488
 
    {
489
 
      app.add_option((*iter).first);
 
485
    if ((*iter).first.empty() == false)
 
486
    {
 
487
      if ((*iter).second.empty() == false)
 
488
      {
 
489
        app.add_option((*iter).first, (*iter).second);
 
490
      }
 
491
      else
 
492
      {
 
493
        app.add_option((*iter).first);
 
494
      }
490
495
    }
491
496
  }
492
497