summaryrefslogtreecommitdiff
path: root/protocols/AimOscar
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2016-03-30 05:54:58 +0000
committerAlexander Gluzsky <sss123next@list.ru>2016-03-30 05:54:58 +0000
commit41fa778883c3bbb5c14470b66c35304f894012c6 (patch)
treeede4902dc3e91fed7c9b77bde2a5941abdea3c7f /protocols/AimOscar
parent7460f623d00f6119979688e5c4d788a8cdc0a478 (diff)
aim:
force disabled ssl as it does not work anymore TODO: implement "clientlogin" api for icq/aim it's requires at least key of registrtrd developer on aol it's using https login procediure with redirect to actual aim/icq server after successfule login procedure git-svn-id: http://svn.miranda-ng.org/main/trunk@16563 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar')
-rwxr-xr-x[-rw-r--r--]protocols/AimOscar/res/aim.rc4
-rwxr-xr-xprotocols/AimOscar/src/client.cpp15
-rwxr-xr-x[-rw-r--r--]protocols/AimOscar/src/ui.cpp23
-rwxr-xr-x[-rw-r--r--]protocols/AimOscar/src/utility.cpp9
4 files changed, 30 insertions, 21 deletions
diff --git a/protocols/AimOscar/res/aim.rc b/protocols/AimOscar/res/aim.rc
index 23a6a62066..58175d02fb 100644..100755
--- a/protocols/AimOscar/res/aim.rc
+++ b/protocols/AimOscar/res/aim.rc
@@ -82,7 +82,7 @@ BEGIN
EDITTEXT IDC_PN,207,119,37,13,ES_AUTOHSCROLL
LTEXT "Port:",IDC_STATIC,158,121,44,12
PUSHBUTTON "Reset",IDC_SVRRESET,254,118,35,14
- CONTROL "Disable SSL",IDC_DSSL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,135,85,10
+ CONTROL "Disable SSL",IDC_DSSL,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,157,135,85,10
CONTROL "Manage Server Groups",IDC_MG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,194,138,13
CONTROL "Force Single Client",IDC_FSC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,146,129,10
END
@@ -93,7 +93,7 @@ EXSTYLE WS_EX_CONTROLPARENT | WS_EX_APPWINDOW
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
PUSHBUTTON "Save Profile",IDC_SETPROFILE,157,4,60,30,WS_DISABLED
- CONTROL "",IDC_PROFILE,"RichEdit50W",ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_NOHIDESEL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,4,36,213,112
+ CONTROL "",IDC_PROFILE,"RichEdit50W",WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP | 0x11c4,4,36,213,112
CONTROL "",IDC_BOLD,"Button",BS_OWNERDRAW,4,4,16,14,WS_EX_RIGHT
CONTROL "",IDC_ITALIC,"Button",BS_OWNERDRAW,20,4,16,14,WS_EX_RIGHT
CONTROL "",IDC_UNDERLINE,"Button",BS_OWNERDRAW,36,4,16,14,WS_EX_RIGHT
diff --git a/protocols/AimOscar/src/client.cpp b/protocols/AimOscar/src/client.cpp
index 656b3b541c..220d93ab51 100755
--- a/protocols/AimOscar/src/client.cpp
+++ b/protocols/AimOscar/src/client.cpp
@@ -56,7 +56,7 @@ int CAimProto::aim_auth_request(HANDLE hServerConn, unsigned short &seqno, const
CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof(mirver), (LPARAM)mirver);
int client_id_len = mir_snprintf(client_id, "Miranda AIM, version %s", mirver);
- char* buf = (char*)alloca(SNAC_SIZE + TLV_HEADER_SIZE * 14 + MD5_HASH_LENGTH + mir_strlen(username) + client_id_len + 30 + mir_strlen(language) + mir_strlen(country));
+ char* buf = (char*)alloca(SNAC_SIZE + TLV_HEADER_SIZE * 13 + MD5_HASH_LENGTH + mir_strlen(username) + client_id_len + 30 + mir_strlen(language) + mir_strlen(country));
aim_writesnac(0x17, 0x02, offset, buf);
aim_writetlv(0x01, (unsigned short)mir_strlen(username), username, offset, buf);
@@ -69,14 +69,13 @@ int CAimProto::aim_auth_request(HANDLE hServerConn, unsigned short &seqno, const
aim_writetlvshort(0x18, AIM_CLIENT_MINOR_VERSION, offset, buf);
aim_writetlvshort(0x19, AIM_CLIENT_LESSER_VERSION, offset, buf);
aim_writetlvshort(0x1A, AIM_CLIENT_BUILD_NUMBER, offset, buf);
- //aim_writetlvshort(0x16, AIM_CLIENT_ID_NUMBER, offset, buf);
aim_writetlvlong(0x14, AIM_CLIENT_DISTRIBUTION_NUMBER, offset, buf);
aim_writetlv(0x0F, (unsigned short)mir_strlen(language), language, offset, buf);
aim_writetlv(0x0E, (unsigned short)mir_strlen(country), country, offset, buf);
aim_writetlvchar(0x4A, getByte(AIM_KEY_FSC, 0) ? 3 : 1, offset, buf);
// aim_writetlvchar(0x94,0,offset,buf);
- if (!getByte(AIM_KEY_DSSL, 0))
- aim_writetlv(0x8c, 0, NULL, offset, buf); // Request SSL connection
+/* if (!getByte(AIM_KEY_DSSL, 0))
+ aim_writetlv(0x8c, 0, NULL, offset, buf); // Request SSL connection */
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
@@ -115,8 +114,8 @@ int CAimProto::aim_new_service_request(HANDLE hServerConn, unsigned short &seqno
char buf[SNAC_SIZE + 2 + TLV_HEADER_SIZE];
aim_writesnac(0x01, 0x04, offset, buf);
aim_writeshort(service, offset, buf);
- if (!getByte(AIM_KEY_DSSL, 0))
- aim_writetlv(0x8c, 0, NULL, offset, buf);
+/* if (!getByte(AIM_KEY_DSSL, 0))
+ aim_writetlv(0x8c, 0, NULL, offset, buf); */
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
@@ -838,8 +837,8 @@ int CAimProto::aim_chat_join_room(HANDLE hServerConn, unsigned short &seqno, cha
aim_writegeneric(cookie_len, chat_cookie, offset, buf); // Value - Cookie
aim_writeshort(instance, offset, buf); // Value - Instance
- if (!getByte(AIM_KEY_DSSL, 0))
- aim_writetlv(0x8c, 0, NULL, offset, buf); // Request SSL connection
+/* if (!getByte(AIM_KEY_DSSL, 0))
+ aim_writetlv(0x8c, 0, NULL, offset, buf); // Request SSL connection */
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp
index 16c4328468..997ce54676 100644..100755
--- a/protocols/AimOscar/src/ui.cpp
+++ b/protocols/AimOscar/src/ui.cpp
@@ -742,7 +742,8 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetDlgItemTextA(hwndDlg, IDC_HN, dbv.pszVal);
db_free(&dbv);
}
- else SetDlgItemTextA(hwndDlg, IDC_HN, ppro->getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_SERVER_NS : AIM_DEFAULT_SERVER);
+ //else SetDlgItemTextA(hwndDlg, IDC_HN, ppro->getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_SERVER_NS : AIM_DEFAULT_SERVER);
+ else SetDlgItemTextA(hwndDlg, IDC_HN, AIM_DEFAULT_SERVER);
SetDlgItemInt(hwndDlg, IDC_PN, ppro->get_default_port(), FALSE);
@@ -758,7 +759,8 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP
CheckDlgButton(hwndDlg, IDC_CM, ppro->getByte(AIM_KEY_CM, 0) ? BST_CHECKED : BST_UNCHECKED);//Check Mail
CheckDlgButton(hwndDlg, IDC_MG, ppro->getByte(AIM_KEY_MG, 1) ? BST_CHECKED : BST_UNCHECKED);//Manage Groups
CheckDlgButton(hwndDlg, IDC_DA, ppro->getByte(AIM_KEY_DA, 0) ? BST_CHECKED : BST_UNCHECKED);//Disable Avatars
- CheckDlgButton(hwndDlg, IDC_DSSL, ppro->getByte(AIM_KEY_DSSL, 0) ? BST_CHECKED : BST_UNCHECKED);//Disable SSL
+ //CheckDlgButton(hwndDlg, IDC_DSSL, ppro->getByte(AIM_KEY_DSSL, 0) ? BST_CHECKED : BST_UNCHECKED);//Disable SSL
+ CheckDlgButton(hwndDlg, IDC_DSSL, BST_CHECKED);//Disable SSL
CheckDlgButton(hwndDlg, IDC_FSC, ppro->getByte(AIM_KEY_FSC, 0) ? BST_CHECKED : BST_UNCHECKED);//Force Single Client
}
break;
@@ -767,15 +769,18 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP
switch (LOWORD(wParam)) {
case IDC_DSSL:
{
- bool dssl = IsDlgButtonChecked(hwndDlg, IDC_DSSL) != 0;
+/* bool dssl = IsDlgButtonChecked(hwndDlg, IDC_DSSL) != 0;
SetDlgItemTextA(hwndDlg, IDC_HN, dssl ? AIM_DEFAULT_SERVER_NS : AIM_DEFAULT_SERVER);
- SetDlgItemInt(hwndDlg, IDC_PN, dssl ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT, FALSE);
+ SetDlgItemInt(hwndDlg, IDC_PN, dssl ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT, FALSE);*/
+ SetDlgItemTextA(hwndDlg, IDC_HN, AIM_DEFAULT_SERVER);
+ SetDlgItemInt(hwndDlg, IDC_PN, AIM_DEFAULT_PORT, FALSE);
}
break;
case IDC_SVRRESET:
- SetDlgItemTextA(hwndDlg, IDC_HN,
- IsDlgButtonChecked(hwndDlg, IDC_DSSL) ? AIM_DEFAULT_SERVER_NS : AIM_DEFAULT_SERVER);
+/* SetDlgItemTextA(hwndDlg, IDC_HN,
+ IsDlgButtonChecked(hwndDlg, IDC_DSSL) ? AIM_DEFAULT_SERVER_NS : AIM_DEFAULT_SERVER); */
+ SetDlgItemTextA(hwndDlg, IDC_HN, AIM_DEFAULT_SERVER);
SetDlgItemInt(hwndDlg, IDC_PN, ppro->get_default_port(), FALSE);
break;
@@ -838,7 +843,8 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP
//Disable Avatar
//Disable SSL
- ppro->setByte(AIM_KEY_DSSL, IsDlgButtonChecked(hwndDlg, IDC_DSSL) != 0);
+ //ppro->setByte(AIM_KEY_DSSL, IsDlgButtonChecked(hwndDlg, IDC_DSSL) != 0);
+ ppro->setByte(AIM_KEY_DSSL, 1);
//Disable SSL
//Force Single Login
@@ -851,7 +857,8 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP
//PN
int port = GetDlgItemInt(hwndDlg, IDC_PN, NULL, FALSE);
- if (port > 0 && port != (ppro->getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT))
+ //if (port > 0 && port != (ppro->getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT))
+ if (port > 0 && port != AIM_DEFAULT_PORT)
ppro->setWord(AIM_KEY_PN, (WORD)port);
else
ppro->delSetting(AIM_KEY_PN);
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 0c785deb79..06849fb8b9 100644..100755
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -99,10 +99,12 @@ void CAimProto::start_connection(void*)
return;
}
- bool use_ssl = !getByte(AIM_KEY_DSSL, 0);
+ //bool use_ssl = !getByte(AIM_KEY_DSSL, 0);
+ bool use_ssl = false;
char* login_url = getStringA(AIM_KEY_HN);
- if (login_url == NULL) login_url = mir_strdup(use_ssl ? AIM_DEFAULT_SERVER : AIM_DEFAULT_SERVER_NS);
+ //if (login_url == NULL) login_url = mir_strdup(use_ssl ? AIM_DEFAULT_SERVER : AIM_DEFAULT_SERVER_NS);
+ if (login_url == NULL) login_url = mir_strdup(AIM_DEFAULT_SERVER);
m_hServerConn = aim_connect(login_url, get_default_port(), use_ssl, login_url);
@@ -145,7 +147,8 @@ bool CAimProto::wait_conn(HANDLE& hConn, HANDLE& hEvent, unsigned short service)
unsigned short CAimProto::get_default_port(void)
{
- return getWord(AIM_KEY_PN, getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT);
+ //return getWord(AIM_KEY_PN, getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT);
+ return AIM_DEFAULT_PORT;
}
bool CAimProto::is_my_contact(MCONTACT hContact)