~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/get_password.cc

  • Committer: Lee Bieber
  • Date: 2011-03-29 00:20:50 UTC
  • mfrom: (2255.1.2 build)
  • Revision ID: kalebral@gmail.com-20110329002050-ma9aozuvc7plwcmu
Merge Vijay - 729891: drizzle -P doesn't prompt
Merge Patrick - 744402: remove freebsd from list of supported platforms

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
      return make_pair("password", PASSWORD_SENTINEL);
160
160
    }
161
161
  }
162
 
 
 
162
  
 
163
  else if (s.find("-P") == 0)
 
164
  {
 
165
    if (s == "-P")
 
166
    {
 
167
      tty_password= true;
 
168
      //check if no argument is passed.
 
169
      return make_pair("password", PASSWORD_SENTINEL);
 
170
    } 
 
171
    
 
172
    if (s.substr(2,2) == "\"\"" || s.substr(2,2) == "''")
 
173
    {
 
174
      // Check if -P"" or -P''
 
175
      return make_pair("password", PASSWORD_SENTINEL);
 
176
    }  
 
177
  }
163
178
  return make_pair(string(""), string(""));
164
179
}
165
180