diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-01 18:49:10 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-01 18:49:10 +0300 |
commit | 40a2497838dcaf2f48366731904ddcbc2545a073 (patch) | |
tree | ce897463bc5bfebfef514d23618565ec26ce7896 /protocols/Gadu-Gadu/src | |
parent | 0f2e98b6058835b2dc0dbad8fd648b398d2a8917 (diff) |
fixes #3367 (GG: удалить неиспользуемые опции)
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r-- | protocols/Gadu-Gadu/src/core.cpp | 4 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.cpp | 8 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.h | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/keepalive.cpp | 16 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/options.cpp | 9 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/resource.h | 5 |
7 files changed, 12 insertions, 34 deletions
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<GaduProto> // options
CMOption<uint8_t> m_autoRecconect;
- CMOption<uint8_t> m_keepConnectionAlive;
CMOption<uint8_t> m_showConnectionErrors;
CMOption<uint8_t> m_useDirectConnections;
CMOption<uint8_t> m_useForwarding;
CMOption<uint8_t> m_useManualHosts;
CMOption<uint8_t> m_useMsgDeliveryAcknowledge;
- CMOption<uint8_t> m_useSslConnection;
CMOption<uint16_t> m_directConnectionPort;
CMOption<uint16_t> 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
|