From d6e05cc3bca53565d9ca65377ab8b0b6190774b3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Nov 2013 18:01:14 +0000 Subject: 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 --- protocols/FacebookRM/src/connection.cpp | 3 +-- protocols/FacebookRM/src/dialogs.cpp | 13 ++++--------- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'protocols/FacebookRM') diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp index abfb0a607b..3b6a57e45e 100644 --- a/protocols/FacebookRM/src/connection.cpp +++ b/protocols/FacebookRM/src/connection.cpp @@ -148,12 +148,11 @@ bool FacebookProto::NegotiateConnection() } ptrA password( getStringA(FACEBOOK_KEY_PASS)); - if (!password || !strlen(password)) { + if (!password || !*password) { NotifyEvent(m_tszUserName,TranslateT("Please enter a password."),NULL,FACEBOOK_EVENT_CLIENT); return false; } - CallService(MS_DB_CRYPT_DECODESTRING, strlen(password) + 1, password); password = mir_utf8encode(password); // Refresh last time of feeds update diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index 3df11ce99c..fbc388bf26 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -58,16 +58,15 @@ INT_PTR CALLBACK FBAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp if (!db_get_s(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv)) { - CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1, - reinterpret_cast(dbv.pszVal)); SetDlgItemTextA(hwnd,IDC_PW,dbv.pszVal); db_free(&dbv); } - if (!proto->isOffline()) { + if (!proto->isOffline()) + { SendMessage(GetDlgItem(hwnd,IDC_UN),EM_SETREADONLY,1,0); - SendMessage(GetDlgItem(hwnd,IDC_PW),EM_SETREADONLY,1,0); } - + SendMessage(GetDlgItem(hwnd,IDC_PW),EM_SETREADONLY,1,0); + } return TRUE; case WM_COMMAND: @@ -97,9 +96,7 @@ INT_PTR CALLBACK FBAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp db_set_s(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,str); GetDlgItemTextA(hwnd,IDC_PW,str,sizeof(str)); - CallService(MS_DB_CRYPT_ENCODESTRING,sizeof(str),reinterpret_cast(str)); db_set_s(0,proto->ModuleName(),FACEBOOK_KEY_PASS,str); - return TRUE; } break; @@ -356,7 +353,6 @@ INT_PTR CALLBACK FBOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp if (!db_get_s(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv)) { - CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,reinterpret_cast(dbv.pszVal)); SetDlgItemTextA(hwnd,IDC_PW,dbv.pszVal); db_free(&dbv); } @@ -409,7 +405,6 @@ INT_PTR CALLBACK FBOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp db_set_s(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,str); GetDlgItemTextA(hwnd,IDC_PW,str,sizeof(str)); - CallService(MS_DB_CRYPT_ENCODESTRING,sizeof(str),reinterpret_cast(str)); proto->setString(FACEBOOK_KEY_PASS, str); GetDlgItemText(hwnd,IDC_GROUP,tstr,sizeof(tstr)); -- cgit v1.2.3