~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/get_password.cc

  • Committer: Monty Taylor
  • Date: 2011-01-26 19:15:55 UTC
  • mto: This revision was merged to the branch mainline in revision 2126.
  • Revision ID: mordred@inaugust.com-20110126191555-nq5nnzyscvngsip2
Turns on -fvisibility=hidden by default. Symbols intended to be used by
plugins need to be marked with DRIZZLED_API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
** This is an own file to avoid conflicts with curses
23
23
*/
24
24
 
25
 
#include <config.h>
26
 
#include <client/get_password.h>
 
25
#include "config.h"
 
26
#include "client/get_password.h"
27
27
 
28
28
#include <string>
29
29
 
159
159
      return make_pair("password", PASSWORD_SENTINEL);
160
160
    }
161
161
  }
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
 
  }
 
162
 
178
163
  return make_pair(string(""), string(""));
179
164
}
180
165