From 40a2497838dcaf2f48366731904ddcbc2545a073 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Mar 2023 18:49:10 +0300 Subject: =?UTF-8?q?fixes=20#3367=20(GG:=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BD=D0=B5=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D1=83=D0=B5=D0=BC=D1=8B=D0=B5=20=D0=BE=D0=BF=D1=86=D0=B8?= =?UTF-8?q?=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Gadu-Gadu/src/core.cpp | 4 ++-- protocols/Gadu-Gadu/src/gg.cpp | 8 +++----- protocols/Gadu-Gadu/src/gg_proto.cpp | 2 -- protocols/Gadu-Gadu/src/gg_proto.h | 2 -- protocols/Gadu-Gadu/src/keepalive.cpp | 16 ++++++---------- protocols/Gadu-Gadu/src/options.cpp | 9 --------- protocols/Gadu-Gadu/src/resource.h | 5 +---- 7 files changed, 12 insertions(+), 34 deletions(-) (limited to 'protocols/Gadu-Gadu/src') diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 7009141127..1b5ab5c32d 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -331,8 +331,8 @@ void __cdecl GaduProto::mainthread(void *) } // Readup SSL/TLS setting - if (p.tls = m_useSslConnection) - debugLogA("mainthread() (%x): Using TLS/SSL for connections.", this); + p.tls = true; + debugLogA("mainthread() (%x): Using TLS/SSL for connections.", this); // Gadu-Gadu accepts image sizes upto 255 p.image_size = 255; diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index fd0aea0f03..99b85fb547 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -124,7 +124,7 @@ void crc_gentable(void) // Calculate the crc value unsigned long crc_get(char *mem) { - register unsigned long crc = 0xFFFFFFFF; + unsigned long crc = 0xFFFFFFFF; while (mem && *mem) crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_table[(crc ^ *(mem++)) & 0xFF]; @@ -164,10 +164,8 @@ void GaduProto::cleanuplastplugin(uint32_t version) // force SSL and keepalive; overwrite old server list; if (version < PLUGIN_MAKE_VERSION(0, 11, 0, 4)) { - setWString("ServerHosts", GG_KEYDEF_SERVERHOSTS); - m_useManualHosts = 1; - m_useSslConnection = 1; - m_keepConnectionAlive = 1; + delSetting("ServerHosts"); + m_useManualHosts = false; } } diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 7f6affb0c4..42892e1064 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -33,8 +33,6 @@ GaduProto::GaduProto(const char *pszProtoName, const wchar_t *tszUserName) : m_autoRecconect(this, "AReconnect", 0), m_useForwarding(this, "Forwarding", 0), m_useManualHosts(this, "ManualHost", 1), - m_useSslConnection(this, "SSLConnection", 1), - m_keepConnectionAlive(this, "KeepAlive", 1), m_showConnectionErrors(this, "ShowCErrors", 0), m_useDirectConnections(this, "DirectConns", 1), m_directConnectionPort(this, "DirectPort", 1550), diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index 388fe907e0..7a49e3901a 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -215,13 +215,11 @@ struct GaduProto : public PROTO // options CMOption m_autoRecconect; - CMOption m_keepConnectionAlive; CMOption m_showConnectionErrors; CMOption m_useDirectConnections; CMOption m_useForwarding; CMOption m_useManualHosts; CMOption m_useMsgDeliveryAcknowledge; - CMOption m_useSslConnection; CMOption m_directConnectionPort; CMOption m_forwardPort; diff --git a/protocols/Gadu-Gadu/src/keepalive.cpp b/protocols/Gadu-Gadu/src/keepalive.cpp index 53bdd8d87f..7e4b7c78e4 100644 --- a/protocols/Gadu-Gadu/src/keepalive.cpp +++ b/protocols/Gadu-Gadu/src/keepalive.cpp @@ -52,19 +52,15 @@ static VOID CALLBACK gg_keepalive(HWND, UINT, UINT_PTR idEvent, DWORD) void GaduProto::keepalive_init() { - if (m_keepConnectionAlive) - { - int i; - for (i = 0; i < MAX_TIMERS && g_timers[i] != nullptr; i++); + int i; + for (i = 0; i < MAX_TIMERS && g_timers[i] != nullptr; i++); - if (i < MAX_TIMERS) - { + if (i < MAX_TIMERS) { #ifdef DEBUGMODE - debugLogA("keepalive_init(): Initializing Timer %d", i); + debugLogA("keepalive_init(): Initializing Timer %d", i); #endif - timer = SetTimer(nullptr, 0, 1000 * 60, gg_keepalive); - g_timers[i] = this; - } + timer = SetTimer(nullptr, 0, 1000 * 60, gg_keepalive); + g_timers[i] = this; } } diff --git a/protocols/Gadu-Gadu/src/options.cpp b/protocols/Gadu-Gadu/src/options.cpp index 6714d3aeb0..76896dd06a 100644 --- a/protocols/Gadu-Gadu/src/options.cpp +++ b/protocols/Gadu-Gadu/src/options.cpp @@ -345,10 +345,8 @@ public: class GaduOptionsDlgAdvanced : public GaduDlgBase { CCtrlCheck chkAutoReconnect; - CCtrlCheck chkKeepConnectionAlive; CCtrlCheck chkMsgAcknowledge; CCtrlCheck chkShowConnectionErrors; - CCtrlCheck chkSslConnection; CCtrlCheck chkManualHosts; CCtrlEdit edtServerHosts; @@ -370,10 +368,8 @@ public: GaduOptionsDlgAdvanced(GaduProto *proto) : GaduDlgBase(proto, IDD_OPT_GG_ADVANCED), chkAutoReconnect(this, IDC_ARECONNECT), - chkKeepConnectionAlive(this, IDC_KEEPALIVE), chkMsgAcknowledge(this, IDC_MSGACK), chkShowConnectionErrors(this, IDC_SHOWCERRORS), - chkSslConnection(this, IDC_SSLCONN), chkManualHosts(this, IDC_MANUALHOST), edtServerHosts(this, IDC_HOST), txtServerHostsLabel(this, IDC_HOST_LIST_L), @@ -388,10 +384,8 @@ public: txtReconnectRequired(this, IDC_RELOADREQD) { CreateLink(chkAutoReconnect, proto->m_autoRecconect); - CreateLink(chkKeepConnectionAlive, proto->m_keepConnectionAlive); CreateLink(chkMsgAcknowledge, proto->m_useMsgDeliveryAcknowledge); CreateLink(chkShowConnectionErrors, proto->m_showConnectionErrors); - CreateLink(chkSslConnection, proto->m_useSslConnection); CreateLink(chkManualHosts, proto->m_useManualHosts); CreateLink(edtServerHosts, proto->m_serverHosts); @@ -413,9 +407,6 @@ public: bool OnInitDialog() override { - chkKeepConnectionAlive.Disable(); - chkSslConnection.Disable(); - txtReconnectRequired.Hide(); return true; } diff --git a/protocols/Gadu-Gadu/src/resource.h b/protocols/Gadu-Gadu/src/resource.h index 3c79d81adb..226b0d82ff 100644 --- a/protocols/Gadu-Gadu/src/resource.h +++ b/protocols/Gadu-Gadu/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by D:\Repozytoria\Miranda NG\protocols\Gadu-Gadu\res\resource.rc +// Used by W:\miranda-ng\protocols\Gadu-Gadu\res\resource.rc // #define IDI_GG 251 #define IDI_IMPORT_TEXT 252 @@ -41,8 +41,6 @@ #define IDC_LOSTPASS 403 #define IDC_FRIENDSONLY 404 #define IDC_SHOWINVISIBLE 405 -#define IDC_KEEPALIVE 406 -#define IDC_SAFESTATUS 407 #define IDC_MANUALHOST 408 #define IDC_HOST 409 #define IDC_PORT 410 @@ -80,7 +78,6 @@ #define IDC_FORWARDPORT 448 #define IDC_FORWARDING 449 #define IDC_MSGACK 450 -#define IDC_SSLCONN 451 #define IDC_VERSION 452 #define IDC_TOKEN 453 #define IDC_IGNORECONF 454 -- cgit v1.2.3