~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/get_password.cc

  • Committer: vjsamuel1990 at gmail
  • Date: 2011-03-28 17:33:30 UTC
  • mto: (2255.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2256.
  • Revision ID: vjsamuel1990@gmail.com-20110328173330-gl1r6yatw4lzv1mb
Merge fix for -P prompt

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