diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-19 18:01:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-19 18:01:14 +0000 |
commit | d6e05cc3bca53565d9ca65377ab8b0b6190774b3 (patch) | |
tree | 76040facd4d0b82162069a19cae8f7f024bf1f65 /protocols/Gadu-Gadu/src/import.cpp | |
parent | 2ef414538760079fa2955fca1a2c03d610459fa8 (diff) |
preparing to the transparent cyphering: end of MS_DB_CRYPT_ENCODESTRING/MS_DB_CRYPT_DECODESTRING
git-svn-id: http://svn.miranda-ng.org/main/trunk@6938 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/import.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/import.cpp | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 7c28acd9df..12233c226c 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -253,10 +253,6 @@ void GGPROTO::parsecontacts(char *contacts) INT_PTR GGPROTO::import_server(WPARAM wParam, LPARAM lParam)
{
- char *password;
- uin_t uin;
- DBVARIANT dbv;
-
// Check if connected
if (!isonline())
{
@@ -268,14 +264,11 @@ INT_PTR GGPROTO::import_server(WPARAM wParam, LPARAM lParam) }
// Readup password
- if (!getString(GG_KEY_PASSWORD, &dbv))
- {
- CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal) + 1, (LPARAM) dbv.pszVal);
- password = _strdup(dbv.pszVal);
- db_free(&dbv);
- }
- else return 0;
+ char *password = getStringA(GG_KEY_PASSWORD);
+ if (password == NULL)
+ return 0;
+ uin_t uin;
if (!(uin = getDword(GG_KEY_UIN, 0)))
return 0;
@@ -300,13 +293,8 @@ INT_PTR GGPROTO::import_server(WPARAM wParam, LPARAM lParam) INT_PTR GGPROTO::remove_server(WPARAM wParam, LPARAM lParam)
{
- char *password;
- uin_t uin;
- DBVARIANT dbv;
-
// Check if connected
- if (!isonline())
- {
+ if (!isonline()) {
MessageBox(NULL,
TranslateT("You have to be connected before you can import/export contacts from/to server."),
m_tszUserName, MB_OK | MB_ICONSTOP
@@ -315,14 +303,11 @@ INT_PTR GGPROTO::remove_server(WPARAM wParam, LPARAM lParam) }
// Readup password
- if (!getString(GG_KEY_PASSWORD, &dbv))
- {
- CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal) + 1, (LPARAM) dbv.pszVal);
- password = _strdup(dbv.pszVal);
- db_free(&dbv);
- }
- else return 0;
+ char *password = getStringA(GG_KEY_PASSWORD);
+ if (password == NULL)
+ return 0;
+ uin_t uin;
if (!(uin = getDword(GG_KEY_UIN, 0)))
return 0;
@@ -491,14 +476,10 @@ INT_PTR GGPROTO::export_server(WPARAM wParam, LPARAM lParam) }
// Readup password
- DBVARIANT dbv;
- if (getString(GG_KEY_PASSWORD, &dbv))
+ char *password = getStringA(GG_KEY_PASSWORD);
+ if (password == NULL)
return 0;
- CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal) + 1, (LPARAM) dbv.pszVal);
- char *password = _strdup(dbv.pszVal);
- db_free(&dbv);
-
uin_t uin = getDword(GG_KEY_UIN, 0);
if (!uin)
return 0;
|