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/FacebookRM | |
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/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/connection.cpp | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 13 |
2 files changed, 5 insertions, 11 deletions
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<LPARAM>(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<LPARAM>(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<LPARAM>(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<LPARAM>(str));
proto->setString(FACEBOOK_KEY_PASS, str);
GetDlgItemText(hwnd,IDC_GROUP,tstr,sizeof(tstr));
|