~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/plugin/listen_tcp.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-12-09 06:02:39 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20101209060239-t0ujftvcvd558yno
Tags: upstream-2010.12.05
ImportĀ upstreamĀ versionĀ 2010.12.05

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include <netinet/tcp.h>
33
33
#include <cerrno>
34
34
 
35
 
using namespace std;
36
 
 
37
35
#define MAX_ACCEPT_RETRY        10      // Test accept this many times
38
36
 
39
37
namespace drizzled
91
89
  hints.ai_socktype= SOCK_STREAM;
92
90
 
93
91
  snprintf(port_buf, NI_MAXSERV, "%d", getPort());
94
 
  ret= getaddrinfo(getHost(), port_buf, &hints, &ai_list);
 
92
  ret= getaddrinfo(getHost().empty() ? NULL : getHost().c_str(), port_buf, &hints, &ai_list);
95
93
  if (ret != 0)
96
94
  {
97
95
    errmsg_printf(ERRMSG_LVL_ERROR, _("getaddrinfo() failed with error %s"),
226
224
  return false;
227
225
}
228
226
 
229
 
const char* plugin::ListenTcp::getHost(void) const
 
227
const std::string plugin::ListenTcp::getHost(void) const
230
228
{
231
 
  return NULL;
 
229
  return "";
232
230
}
233
231
 
234
232
} /* namespace drizzled */