From 90ac4c689e1322b48f6ca53a0c8fff81daf73c9c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Apr 2023 18:50:46 +0300 Subject: code cleaning --- protocols/JabberG/src/jabber_proto.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'protocols/JabberG/src/jabber_proto.cpp') diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 282672e4ea..9891bfd60f 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -402,9 +402,8 @@ MCONTACT CJabberProto::AddToListByEvent(int flags, int /*iContact*/, MEVENT hDbE { debugLogA("AddToListByEvent"); - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) + DB::EventInfo dbei(hDbEvent); + if (!dbei) return 0; if (mir_strcmp(dbei.szModule, m_szModuleName)) return 0; @@ -423,9 +422,8 @@ int CJabberProto::Authorize(MEVENT hDbEvent) if (!m_bJabberOnline) return 1; - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) + DB::EventInfo dbei(hDbEvent); + if (!dbei) return 1; if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1; @@ -463,9 +461,8 @@ int CJabberProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) debugLogA("Entering AuthDeny"); - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) + DB::EventInfo dbei(hDbEvent); + if (!dbei) return 1; if (dbei.eventType != EVENTTYPE_AUTHREQUEST) -- cgit v1.2.3