[Greater-commits] r198 - trunk/Administration
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jun 14 16:27:51 CEST 2011
Author: aheinecke
Date: 2011-06-14 16:27:51 +0200 (Tue, 14 Jun 2011)
New Revision: 198
Modified:
trunk/Administration/AuthenticateDialog.cpp
Log:
Begin fixing the usage of the temporary pointers returned by mb_str
Modified: trunk/Administration/AuthenticateDialog.cpp
===================================================================
--- trunk/Administration/AuthenticateDialog.cpp 2011-06-14 14:01:14 UTC (rev 197)
+++ trunk/Administration/AuthenticateDialog.cpp 2011-06-14 14:27:51 UTC (rev 198)
@@ -170,9 +170,6 @@
wxString username;
wxString password;
int admin=0;
- const char* p_d_const;
- const char* p_u_const;
- const char* p_p_const;
char p_database[30];
char p_user[30];
char p_password[30];
@@ -197,16 +194,11 @@
textPwd->SetFocus();
return;
}
-
- //Convert values to const char*
- p_d_const = database.mb_str();
- p_u_const = username.mb_str();
- p_p_const = password.mb_str();
//Copy from const char* to char[]
- strcpy(p_database, p_d_const);
- strcpy(p_user, p_u_const);
- strcpy(p_password, p_p_const);
+ strcpy(p_database, database.mb_str());
+ strcpy(p_user, username.mb_str());
+ strcpy(p_password, password.mb_str());
//Call API function to connect and check, if user is table owner (admin)
if (!da_db_connect_admin(p_user, p_password, p_database, &admin, &errinfo))
More information about the Greater-commits
mailing list