~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/drizzle_protocol/oldlibdrizzle.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
#define PROTOCOL_VERSION 10
37
37
 
 
38
static const uint32_t DRIZZLE_TCP_PORT= 4427;
38
39
static const unsigned int PACKET_BUFFER_EXTRA_ALLOC= 1024;
39
40
static uint32_t port;
40
41
static uint32_t connect_timeout;
51
52
 
52
53
in_port_t ListenDrizzleProtocol::getPort(void) const
53
54
{
54
 
  struct servent *serv_ptr;
55
55
  char *env;
56
56
 
57
57
  if (port == 0)
58
58
  {
59
59
    port= DRIZZLE_TCP_PORT;
60
60
 
61
 
    if (DRIZZLE_TCP_PORT_DEFAULT == 0)
62
 
    {
63
 
      if ((serv_ptr= getservbyname("drizzle", "tcp")))
64
 
        port= ntohs((u_short) serv_ptr->s_port);
65
 
    }
66
 
 
67
61
    if ((env = getenv("DRIZZLE_TCP_PORT")))
68
62
      port= (uint32_t) atoi(env);
69
63
 
824
818
}
825
819
 
826
820
static DRIZZLE_SYSVAR_UINT(port, port, PLUGIN_VAR_RQCMDARG,
827
 
                           N_("Port number to use for connection or 0 for default to, in order of "
828
 
                              "preference, drizzle.cnf, $DRIZZLE_TCP_PORT, built-in default ("
829
 
                              STRINGIFY_ARG(DRIZZLE_TCP_PORT) ")."),
 
821
                           N_("Port number to use for connection or 0 for "
 
822
                              "default to, in order of "
 
823
                              "preference, drizzle.cnf, $DRIZZLE_TCP_PORT, "
 
824
                              "built-in default (4427)."),
830
825
                           NULL, NULL, 0, 0, 65535, 0);
831
826
static DRIZZLE_SYSVAR_UINT(connect_timeout, connect_timeout,
832
827
                           PLUGIN_VAR_RQCMDARG, N_("Connect Timeout."),