summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-11-19 18:01:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-11-19 18:01:14 +0000
commitd6e05cc3bca53565d9ca65377ab8b0b6190774b3 (patch)
tree76040facd4d0b82162069a19cae8f7f024bf1f65 /protocols/WhatsApp/src
parent2ef414538760079fa2955fca1a2c03d610459fa8 (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/WhatsApp/src')
-rw-r--r--protocols/WhatsApp/src/connection.cpp2
-rw-r--r--protocols/WhatsApp/src/dialogs.cpp15
2 files changed, 5 insertions, 12 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp
index 9aae55ac32..5fc08ec1dc 100644
--- a/protocols/WhatsApp/src/connection.cpp
+++ b/protocols/WhatsApp/src/connection.cpp
@@ -87,8 +87,6 @@ void WhatsAppProto::stayConnectedLoop(void*)
error = true;
if ( !getString(WHATSAPP_KEY_PASS, &dbv))
{
- CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
- reinterpret_cast<LPARAM>(dbv.pszVal));
pass = dbv.pszVal;
db_free(&dbv);
error = pass.empty();
diff --git a/protocols/WhatsApp/src/dialogs.cpp b/protocols/WhatsApp/src/dialogs.cpp
index 73f420f2f0..6a909346a8 100644
--- a/protocols/WhatsApp/src/dialogs.cpp
+++ b/protocols/WhatsApp/src/dialogs.cpp
@@ -4,8 +4,7 @@ INT_PTR CALLBACK WhatsAppAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPA
{
WhatsAppProto *proto;
- switch (message)
- {
+ switch (message) {
case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
@@ -36,17 +35,15 @@ INT_PTR CALLBACK WhatsAppAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPA
if ( !db_get_s(0,proto->ModuleName(),WHATSAPP_KEY_PASS,&dbv,DBVT_ASCIIZ))
{
- 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()) {
- SendMessage(GetDlgItem(hwnd,IDC_CC),EM_SETREADONLY,1,0);
- SendMessage(GetDlgItem(hwnd,IDC_LOGIN),EM_SETREADONLY,1,0);
- SendMessage(GetDlgItem(hwnd,IDC_NICK),EM_SETREADONLY,1,0);
- SendMessage(GetDlgItem(hwnd,IDC_PW),EM_SETREADONLY,1,0);
+ SendMessage(GetDlgItem(hwnd, IDC_CC), EM_SETREADONLY, 1, 0);
+ SendMessage(GetDlgItem(hwnd, IDC_LOGIN), EM_SETREADONLY, 1, 0);
+ SendMessage(GetDlgItem(hwnd, IDC_NICK), EM_SETREADONLY, 1, 0);
+ SendMessage(GetDlgItem(hwnd, IDC_PW), EM_SETREADONLY, 1, 0);
EnableWindow(GetDlgItem(hwnd, IDC_SSL), FALSE);
}
@@ -88,7 +85,6 @@ INT_PTR CALLBACK WhatsAppAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPA
string pw = proto->Register(REG_STATE_REG_CODE, string(cc), string(number), string(code));
if (!pw.empty())
{
- CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(pw.c_str()), (LPARAM)pw.c_str());
proto->setString(WHATSAPP_KEY_PASS, pw.c_str());
MessageBox(NULL, TranslateT("Your password has been set automatically.\nIf you change your password manually you may lose it and need to request a new code!"), PRODUCT_NAME, MB_ICONWARNING);
}
@@ -127,7 +123,6 @@ INT_PTR CALLBACK WhatsAppAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPA
db_set_b(0, proto->ModuleName(), WHATSAPP_KEY_SSL, IsDlgButtonChecked(hwnd, IDC_SSL));
GetDlgItemTextA(hwnd,IDC_PW,str,sizeof(str));
- CallService(MS_DB_CRYPT_ENCODESTRING,sizeof(str),reinterpret_cast<LPARAM>(str));
db_set_s(0,proto->ModuleName(),WHATSAPP_KEY_PASS,str);
return TRUE;