diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-04 16:42:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-04 16:42:23 +0300 |
commit | 32cd89f64ef0449eac0ceea2ba9bc1aa36c5759b (patch) | |
tree | 5cb92407bb71893399210adb0d8dadcc53ab6dd6 /plugins/SMS/src/SMS_svc.cpp | |
parent | 60a76a56531ceb2bb6d03add1de32ceeef832be9 (diff) |
the error code of db_event_get() should be checked
Diffstat (limited to 'plugins/SMS/src/SMS_svc.cpp')
-rw-r--r-- | plugins/SMS/src/SMS_svc.cpp | 24 |
1 files changed, 0 insertions, 24 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);
- }
-}
|