summaryrefslogtreecommitdiff
path: root/plugins/SMS
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-04 16:42:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-04 16:42:23 +0300
commit32cd89f64ef0449eac0ceea2ba9bc1aa36c5759b (patch)
tree5cb92407bb71893399210adb0d8dadcc53ab6dd6 /plugins/SMS
parent60a76a56531ceb2bb6d03add1de32ceeef832be9 (diff)
the error code of db_event_get() should be checked
Diffstat (limited to 'plugins/SMS')
-rw-r--r--plugins/SMS/src/SMS_svc.cpp24
-rw-r--r--plugins/SMS/src/stdafx.h1
2 files changed, 0 insertions, 25 deletions
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index ee3b8dc53c..1f62781b2f 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -49,8 +49,6 @@ int LoadModules(void)
Skin_AddSound("RecvSMSConfirmation", PROTOCOL_NAMEW, LPGENW("Incoming SMS Confirmation"));
RefreshAccountList(NULL, NULL);
-
- RestoreUnreadMessageAlerts();
return 0;
}
@@ -130,25 +128,3 @@ int ReadAckSMS(WPARAM, LPARAM lParam)
}
return 1;
}
-
-void RestoreUnreadMessageAlerts(void)
-{
- DBEVENTINFO dbei = {};
-
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
- dbei.cbBlob = 0;
- if (db_event_get(hDbEvent, &dbei) == 0)
- if ((dbei.flags & (DBEF_SENT | DBEF_READ)) == 0 && ((dbei.eventType == ICQEVENTTYPE_SMS) || (dbei.eventType == ICQEVENTTYPE_SMSCONFIRMATION)))
- if (dbei.cbBlob > MIN_SMS_DBEVENT_LEN)
- handleNewMessage(hContact, (LPARAM)hDbEvent);
- }
-
- for (MEVENT hDbEvent = db_event_firstUnread(NULL); hDbEvent; hDbEvent = db_event_next(NULL, hDbEvent)) {
- dbei.cbBlob = 0;
- if (db_event_get(hDbEvent, &dbei) == 0)
- if ((dbei.flags & (DBEF_SENT | DBEF_READ)) == 0 && ((dbei.eventType == ICQEVENTTYPE_SMS) || (dbei.eventType == ICQEVENTTYPE_SMSCONFIRMATION)))
- if (dbei.cbBlob > MIN_SMS_DBEVENT_LEN)
- handleNewMessage(NULL, (LPARAM)hDbEvent);
- }
-}
diff --git a/plugins/SMS/src/stdafx.h b/plugins/SMS/src/stdafx.h
index a13314daaf..a908077d6c 100644
--- a/plugins/SMS/src/stdafx.h
+++ b/plugins/SMS/src/stdafx.h
@@ -122,7 +122,6 @@ int LoadModules();
int handleAckSMS(WPARAM wParam,LPARAM lParam);
int handleNewMessage(WPARAM wParam,LPARAM lParam);
-void RestoreUnreadMessageAlerts();
// Declaration of Menu SMS send click function
int SmsRebuildContactMenu(WPARAM wParam,LPARAM lParam);