From d04e6d87584b145046a62c660fac99bfd1acc947 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 19 May 2015 18:36:48 +0000 Subject: AIM: -minor bugfixes git-svn-id: http://svn.miranda-ng.org/main/trunk@13697 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/connection.cpp | 141 +++++++++++++++++----------------- protocols/AimOscar/src/server.cpp | 4 +- protocols/AimOscar/src/ui.cpp | 4 +- protocols/AimOscar/src/utility.cpp | 2 +- 4 files changed, 74 insertions(+), 77 deletions(-) (limited to 'protocols') diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index d813cb5646..1961da1dbc 100644 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -61,84 +61,81 @@ HANDLE CAimProto::aim_peer_connect(unsigned long ip, unsigned short port) void CAimProto::aim_connection_authorization(void) { - NETLIBPACKETRECVER packetRecv = {0}; - HANDLE hServerPacketRecver = NULL; - - if (m_iDesiredStatus == ID_STATUS_OFFLINE) - goto exit; - - char *password = getStringA(AIM_KEY_PW); - if (password == NULL) - goto exit; - - mir_free(username); - username = getStringA(AIM_KEY_SN); - if (username == NULL) - goto exit; - - hServerPacketRecver = (HANDLE)CallService(MS_NETLIB_CREATEPACKETRECVER, (WPARAM)hServerConn, 2048 * 4); - packetRecv.cbSize = sizeof(packetRecv); - packetRecv.dwTimeout = 5000; - for (;;) { - int recvResult = CallService(MS_NETLIB_GETMOREPACKETS, (WPARAM) hServerPacketRecver, (LPARAM) & packetRecv); - if (recvResult == 0) { - debugLogA("Connection Closed: No Error? during Connection Authorization"); - break; - } - else if (recvResult < 0) { - debugLogA("Connection Closed: Socket Error during Connection Authorization %d", WSAGetLastError()); - break; - } - else { - unsigned short flap_length=0; - for (;packetRecv.bytesUsed 2) { - unsigned char type = tlv.ubyte(0); +// unsigned char type = tlv.ubyte(0); if (name_length == 1) { mir_free(hash_sm); @@ -1436,7 +1436,7 @@ void CAimProto::snac_file_decline(SNAC &snac)//family 0x0004 { int sn_len = snac.ubyte(10); char* sn = snac.part(11, sn_len); - int reason = snac.ushort(11 + sn_len); +// int reason = snac.ushort(11 + sn_len); MCONTACT hContact = contact_from_sn(sn); msg_ack_param *msg_ack = (msg_ack_param*)mir_alloc(sizeof(msg_ack_param)); diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index e38ebfe9b6..bef02edf15 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -71,7 +71,7 @@ void DrawMyControl(HDC hDC, HWND /*hwndButton*/, HANDLE hTheme, UINT iState, REC } else // ...else draw non pressed button { - UINT uState = DFCS_BUTTONPUSH|(bIsPressed? DFCS_PUSHED : 0); + UINT uState = DFCS_BUTTONPUSH; DrawFrameControl(hDC, &rect, DFC_BUTTON, uState); } } @@ -919,7 +919,7 @@ 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)) 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 499ab43c8a..67a9e26c69 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -439,7 +439,7 @@ void CAimProto::set_local_nick(MCONTACT hContact, char* nick, char* note) unsigned short buddy_id = getBuddyId(hContact, i); if (buddy_id == 0) break; - aim_mod_buddy(hServerConn, seqno, dbv.pszVal, group_id, buddy_id, nick, note); + aim_mod_buddy(hServerConn, seqno, dbv.pszVal, buddy_id, group_id, nick, note); } db_free(&dbv); } -- cgit v1.2.3