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/WhatsApp/src/dialogs.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'protocols/WhatsApp/src/dialogs.cpp') 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(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(str)); db_set_s(0,proto->ModuleName(),WHATSAPP_KEY_PASS,str); return TRUE; -- cgit v1.2.3