From 1979fd80424d16b2e489f9b57d01d9c7811d25a2 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Mon, 2 Jan 2023 21:10:29 +0300 Subject: Update copyrights --- plugins/Dbx_mdbx/src/dbcheck.cpp | 234 ++++++++++++++++----------------- plugins/Dbx_mdbx/src/dbcontacts.cpp | 2 +- plugins/Dbx_mdbx/src/dbcrypt.cpp | 2 +- plugins/Dbx_mdbx/src/dbevents.cpp | 2 +- plugins/Dbx_mdbx/src/dbintf.cpp | 2 +- plugins/Dbx_mdbx/src/dbintf.h | 2 +- plugins/Dbx_mdbx/src/dbmodulechain.cpp | 2 +- plugins/Dbx_mdbx/src/dbsettings.cpp | 2 +- plugins/Dbx_mdbx/src/dbutils.cpp | 2 +- plugins/Dbx_mdbx/src/init.cpp | 2 +- plugins/Dbx_mdbx/src/stdafx.cxx | 2 +- plugins/Dbx_mdbx/src/stdafx.h | 2 +- plugins/Dbx_mdbx/src/version.h | 2 +- 13 files changed, 129 insertions(+), 129 deletions(-) (limited to 'plugins/Dbx_mdbx/src') diff --git a/plugins/Dbx_mdbx/src/dbcheck.cpp b/plugins/Dbx_mdbx/src/dbcheck.cpp index ed812365be..48449d360b 100644 --- a/plugins/Dbx_mdbx/src/dbcheck.cpp +++ b/plugins/Dbx_mdbx/src/dbcheck.cpp @@ -1,117 +1,117 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "stdafx.h" - -///////////////////////////////////////////////////////////////////////////////////////// -// we are tracing EventsSort table to verify that they have correct event ids - -int CDbxMDBX::CheckEvents1(void) -{ - txn_ptr trnlck(this); - cursor_ptr cursor(trnlck, m_dbEventsSort); - - MDBX_val key, data; - for (int ret = mdbx_cursor_get(cursor, &key, &data, MDBX_FIRST); ret == MDBX_SUCCESS; ret = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { - auto *pData = (DBEventSortingKey *)key.iov_base; - - // if that's not a member of system event, check contact's existence first - if (pData->hContact != 0) { - auto *cc = m_cache->GetCachedContact(pData->hContact); - if (cc == nullptr) { - mdbx_cursor_del(cursor, MDBX_UPSERT); - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong contact ID %d, deleting"), pData->hContact)); - continue; - } - } - - if (GetBlobSize(pData->hEvent) == -1) { - mdbx_cursor_del(cursor, MDBX_UPSERT); - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong event ID %d:%08X, deleting"), pData->hContact, pData->hEvent)); - continue; - } - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// we are tracing EventId table to verify that they have correct event ids - -int CDbxMDBX::CheckEvents2(void) -{ - txn_ptr trnlck(this); - cursor_ptr cursor(trnlck, m_dbEventIds); - - MDBX_val key, data; - for (int ret = mdbx_cursor_get(cursor, &key, &data, MDBX_FIRST); ret == MDBX_SUCCESS; ret = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { - MEVENT hDbEvent = *(MEVENT *)data.iov_base; - if (GetBlobSize(hDbEvent) == -1) { - mdbx_cursor_del(cursor, MDBX_UPSERT); - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned event id with wrong event ID %08X, deleting"), hDbEvent)); - continue; - } - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// we are tracing Settings table to verify that they have correct contact ids - -int CDbxMDBX::CheckEvents3(void) -{ - txn_ptr trnlck(this); - cursor_ptr cursor(trnlck, m_dbSettings); - - MDBX_val key, data; - for (int ret = mdbx_cursor_get(cursor, &key, &data, MDBX_FIRST); ret == MDBX_SUCCESS; ret = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { - auto *pKey = (DBSettingKey *)key.iov_base; - - if (pKey->hContact) { - auto *cc = m_cache->GetCachedContact(pKey->hContact); - if (cc == nullptr) { - mdbx_cursor_del(cursor, MDBX_UPSERT); - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned setting with wrong contact ID %08X, deleting"), pKey->hContact)); - continue; - } - } - } - - return 0; -} - - -/////////////////////////////////////////////////////////////////////////////// -// MIDatabaseChecker - -int CDbxMDBX::CheckDb(int phase) -{ - switch (phase) { - case 0: return CheckEvents1(); - case 1: return CheckEvents2(); - case 2: return CheckEvents3(); - } - - return ERROR_OUT_OF_PAPER; -} +/* + +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// +// we are tracing EventsSort table to verify that they have correct event ids + +int CDbxMDBX::CheckEvents1(void) +{ + txn_ptr trnlck(this); + cursor_ptr cursor(trnlck, m_dbEventsSort); + + MDBX_val key, data; + for (int ret = mdbx_cursor_get(cursor, &key, &data, MDBX_FIRST); ret == MDBX_SUCCESS; ret = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { + auto *pData = (DBEventSortingKey *)key.iov_base; + + // if that's not a member of system event, check contact's existence first + if (pData->hContact != 0) { + auto *cc = m_cache->GetCachedContact(pData->hContact); + if (cc == nullptr) { + mdbx_cursor_del(cursor, MDBX_UPSERT); + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong contact ID %d, deleting"), pData->hContact)); + continue; + } + } + + if (GetBlobSize(pData->hEvent) == -1) { + mdbx_cursor_del(cursor, MDBX_UPSERT); + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong event ID %d:%08X, deleting"), pData->hContact, pData->hEvent)); + continue; + } + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// we are tracing EventId table to verify that they have correct event ids + +int CDbxMDBX::CheckEvents2(void) +{ + txn_ptr trnlck(this); + cursor_ptr cursor(trnlck, m_dbEventIds); + + MDBX_val key, data; + for (int ret = mdbx_cursor_get(cursor, &key, &data, MDBX_FIRST); ret == MDBX_SUCCESS; ret = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { + MEVENT hDbEvent = *(MEVENT *)data.iov_base; + if (GetBlobSize(hDbEvent) == -1) { + mdbx_cursor_del(cursor, MDBX_UPSERT); + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned event id with wrong event ID %08X, deleting"), hDbEvent)); + continue; + } + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// we are tracing Settings table to verify that they have correct contact ids + +int CDbxMDBX::CheckEvents3(void) +{ + txn_ptr trnlck(this); + cursor_ptr cursor(trnlck, m_dbSettings); + + MDBX_val key, data; + for (int ret = mdbx_cursor_get(cursor, &key, &data, MDBX_FIRST); ret == MDBX_SUCCESS; ret = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { + auto *pKey = (DBSettingKey *)key.iov_base; + + if (pKey->hContact) { + auto *cc = m_cache->GetCachedContact(pKey->hContact); + if (cc == nullptr) { + mdbx_cursor_del(cursor, MDBX_UPSERT); + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned setting with wrong contact ID %08X, deleting"), pKey->hContact)); + continue; + } + } + } + + return 0; +} + + +/////////////////////////////////////////////////////////////////////////////// +// MIDatabaseChecker + +int CDbxMDBX::CheckDb(int phase) +{ + switch (phase) { + case 0: return CheckEvents1(); + case 1: return CheckEvents2(); + case 2: return CheckEvents3(); + } + + return ERROR_OUT_OF_PAPER; +} diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp index 13beacb0ac..d96a94f806 100644 --- a/plugins/Dbx_mdbx/src/dbcontacts.cpp +++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp index 5b67f18ea7..7dd373f743 100644 --- a/plugins/Dbx_mdbx/src/dbcrypt.cpp +++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index 581a762c0a..0d26fa1510 100644 --- a/plugins/Dbx_mdbx/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index 3570b60690..32993384b8 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h index cdbdfc7cf3..ee612dba63 100644 --- a/plugins/Dbx_mdbx/src/dbintf.h +++ b/plugins/Dbx_mdbx/src/dbintf.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/dbmodulechain.cpp b/plugins/Dbx_mdbx/src/dbmodulechain.cpp index e528c23397..229f6cb4fc 100644 --- a/plugins/Dbx_mdbx/src/dbmodulechain.cpp +++ b/plugins/Dbx_mdbx/src/dbmodulechain.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp index 68fdcbe46a..074c107634 100644 --- a/plugins/Dbx_mdbx/src/dbsettings.cpp +++ b/plugins/Dbx_mdbx/src/dbsettings.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/dbutils.cpp b/plugins/Dbx_mdbx/src/dbutils.cpp index 380b714069..ebe6c85123 100644 --- a/plugins/Dbx_mdbx/src/dbutils.cpp +++ b/plugins/Dbx_mdbx/src/dbutils.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp index d3911ae0c9..b4f0bf711f 100644 --- a/plugins/Dbx_mdbx/src/init.cpp +++ b/plugins/Dbx_mdbx/src/init.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/stdafx.cxx b/plugins/Dbx_mdbx/src/stdafx.cxx index f64d25234b..ebbde0ade1 100644 --- a/plugins/Dbx_mdbx/src/stdafx.cxx +++ b/plugins/Dbx_mdbx/src/stdafx.cxx @@ -1,5 +1,5 @@ /* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/plugins/Dbx_mdbx/src/stdafx.h b/plugins/Dbx_mdbx/src/stdafx.h index f150177cd9..f329331d8f 100644 --- a/plugins/Dbx_mdbx/src/stdafx.h +++ b/plugins/Dbx_mdbx/src/stdafx.h @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/Dbx_mdbx/src/version.h b/plugins/Dbx_mdbx/src/version.h index 29a2eeb1b7..bd19e10b94 100644 --- a/plugins/Dbx_mdbx/src/version.h +++ b/plugins/Dbx_mdbx/src/version.h @@ -10,4 +10,4 @@ #define __DESCRIPTION "Provides Miranda database support: global settings, contacts, history, settings per contact." #define __AUTHOR "Miranda-NG project" #define __AUTHORWEB "https://miranda-ng.org/p/Dbx_mdbx" -#define __COPYRIGHT "© 2015-22 Miranda NG team" +#define __COPYRIGHT "© 2015-23 Miranda NG team" -- cgit v1.2.3