summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-08-15 11:33:35 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-08-15 11:33:35 +0000
commitde6edc08ee0c1faffb6456abc31fc9bd8a5b0e32 (patch)
tree0cbd2f129c3407707f46939458fdebcd306ac9da
parent761620b2f9291f8e45816c7c93cbbbbf97b06254 (diff)
StatusPlugins:
- Minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@14959 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.cpp3
-rw-r--r--plugins/StatusPlugins/KeepStatus/options.cpp7
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp4
3 files changed, 9 insertions, 5 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
index 548d07cb7b..97d0b6f634 100644
--- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
@@ -179,6 +179,7 @@ static PROTOCOLSETTINGEX** GetCurrentProtoSettingsCopy()
for (int i = 0; i < connectionSettings.getCount(); i++) {
ps[i] = (PROTOCOLSETTINGEX*)calloc(1, sizeof(PROTOCOLSETTINGEX));
if (ps[i] == NULL) {
+ free(ps);
return NULL;
}
@@ -571,7 +572,7 @@ static int ProcessProtoAck(WPARAM, LPARAM lParam)
case LOGINERR_SETDELAY:
{
- int newDelay = newDelay = 1000 * db_get_dw(NULL, MODULENAME, SETTING_LOGINERR_DELAY, DEFAULT_MAXDELAY);
+ int newDelay = 1000 * db_get_dw(NULL, MODULENAME, SETTING_LOGINERR_DELAY, DEFAULT_MAXDELAY);
log_infoA("KeepStatus: set delay to %d on login error (%s)", newDelay / 1000, ack->szModule);
StartTimer(IDT_CHECKCONN, newDelay, TRUE);
}
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp
index 5bfc7267cd..5cafcaadbf 100644
--- a/plugins/StatusPlugins/KeepStatus/options.cpp
+++ b/plugins/StatusPlugins/KeepStatus/options.cpp
@@ -32,7 +32,6 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam
{
LVCOLUMN lvCol;
LVITEM lvItem;
- int i;
DBVARIANT dbv;
SetDlgItemInt(hwndDlg, IDC_MAXRETRIES, db_get_b(NULL, MODULENAME, SETTING_MAXRETRIES, DEFAULT_MAXRETRIES), FALSE);
@@ -42,8 +41,10 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam
CheckDlgButton(hwndDlg, IDC_CHKINET, db_get_b(NULL, MODULENAME, SETTING_CHKINET, FALSE) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CONTCHECK, db_get_b(NULL, MODULENAME, SETTING_CONTCHECK, FALSE) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_BYPING, db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE) ? BST_CHECKED : BST_UNCHECKED);
- if (!db_get(NULL, MODULENAME, SETTING_PINGHOST, &dbv))
+ if (!db_get_s(NULL, MODULENAME, SETTING_PINGHOST, &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_PINGHOST, dbv.pszVal);
+ db_free(&dbv);
+ }
// proto list
HWND hList = GetDlgItem(hwndDlg, IDC_PROTOCOLLIST);
ListView_SetExtendedListViewStyleEx(hList, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
@@ -62,7 +63,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam
PROTOACCOUNT** protos;
Proto_EnumAccounts(&count, &protos);
- for (i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
if (!IsSuitableProto(protos[i]))
continue;
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index 21ca2d2385..f5920c333b 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -142,8 +142,10 @@ static TCHAR* GetLinkDescription(TSettingsList& protoSettings)
status = TranslateT("<last>");
else if (p.status == ID_STATUS_CURRENT)
status = TranslateT("<current>");
- else if (p.status >= MIN_STATUS && p.status <= MAX_STATUS )
+ else if (p.status >= MIN_STATUS && p.status <= MAX_STATUS)
status = pcli->pfnGetStatusModeDescription(p.status, 0);
+ else
+ status = NULL;
if (status == NULL)
status = TranslateT("<unknown>");