~jaypipes/drizzle/new-test-runner

« back to all changes in this revision

Viewing changes to client/drizzleadmin.cc

  • Committer: Jay Pipes
  • Date: 2008-12-11 17:52:34 UTC
  • mfrom: (482.16.152 testable)
  • Revision ID: jpipes@serialcoder-20081211175234-uqsfvmgxejvmellq
merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#define SHUTDOWN_DEF_TIMEOUT 3600               /* Wait for shutdown */
33
33
 
34
34
char *host= NULL, *user= NULL, *opt_password= NULL;
35
 
static bool interrupted= false, opt_verbose= false,tty_password= false; 
 
35
static bool interrupted= false, opt_verbose= false,tty_password= false;
36
36
static uint32_t tcp_port= 0, option_wait= 0, option_silent= 0;
37
37
static uint32_t my_end_arg;
38
38
static uint32_t opt_connect_timeout, opt_shutdown_timeout;
41
41
using namespace std;
42
42
 
43
43
/*
44
 
  Forward declarations 
 
44
  Forward declarations
45
45
*/
46
46
static void usage(void);
47
47
static void print_version(void);
118
118
    if (argument)
119
119
    {
120
120
      char *start=argument;
121
 
      free(opt_password);
122
 
      opt_password= my_strdup(argument,MYF(MY_FAE));
 
121
      if (opt_password)
 
122
        free(opt_password);
 
123
 
 
124
      opt_password= strdup(argument);
 
125
      if (opt_password == NULL)
 
126
      {
 
127
        fprintf(stderr, _("Memory allocation error while copying password. "
 
128
                          "Aborting.\n"));
 
129
        exit(ENOMEM);
 
130
      }
123
131
      while (*argument) *argument++= 'x';   /* Destroy argument */
124
132
      if (*start)
125
133
        start[1]=0; /* Cut length of argument */
126
134
      tty_password= 0;
127
135
    }
128
 
    else 
129
 
      tty_password= 1; 
 
136
    else
 
137
      tty_password= 1;
130
138
    break;
131
139
  case 's':
132
140
    option_silent++;