mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
make DB::_memberChanged and _networkChanged virtual
This commit is contained in:
parent
47154fa623
commit
19f4146aca
3 changed files with 9 additions and 5 deletions
|
@ -197,6 +197,7 @@ void DB::networks(std::set<uint64_t> &networks)
|
||||||
|
|
||||||
void DB::_memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool notifyListeners)
|
void DB::_memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool notifyListeners)
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "DB::_memberChanged\n");
|
||||||
uint64_t memberId = 0;
|
uint64_t memberId = 0;
|
||||||
uint64_t networkId = 0;
|
uint64_t networkId = 0;
|
||||||
bool isAuth = false;
|
bool isAuth = false;
|
||||||
|
@ -312,6 +313,7 @@ void DB::_memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool no
|
||||||
|
|
||||||
void DB::_networkChanged(nlohmann::json &old,nlohmann::json &networkConfig,bool notifyListeners)
|
void DB::_networkChanged(nlohmann::json &old,nlohmann::json &networkConfig,bool notifyListeners)
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "DB::_networkChanged\n");
|
||||||
if (networkConfig.is_object()) {
|
if (networkConfig.is_object()) {
|
||||||
const std::string ids = networkConfig["id"];
|
const std::string ids = networkConfig["id"];
|
||||||
const uint64_t networkId = Utils::hexStrToU64(ids.c_str());
|
const uint64_t networkId = Utils::hexStrToU64(ids.c_str());
|
||||||
|
|
|
@ -147,8 +147,8 @@ protected:
|
||||||
std::mutex lock;
|
std::mutex lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
void _memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool notifyListeners);
|
virtual void _memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool notifyListeners);
|
||||||
void _networkChanged(nlohmann::json &old,nlohmann::json &networkConfig,bool notifyListeners);
|
virtual void _networkChanged(nlohmann::json &old,nlohmann::json &networkConfig,bool notifyListeners);
|
||||||
void _fillSummaryInfo(const std::shared_ptr<_Network> &nw,NetworkSummaryInfo &info);
|
void _fillSummaryInfo(const std::shared_ptr<_Network> &nw,NetworkSummaryInfo &info);
|
||||||
|
|
||||||
std::vector<DB::ChangeListener *> _changeListeners;
|
std::vector<DB::ChangeListener *> _changeListeners;
|
||||||
|
|
|
@ -110,12 +110,14 @@ protected:
|
||||||
{
|
{
|
||||||
inline std::size_t operator()(const std::pair<uint64_t,uint64_t> &p) const { return (std::size_t)(p.first ^ p.second); }
|
inline std::size_t operator()(const std::pair<uint64_t,uint64_t> &p) const { return (std::size_t)(p.first ^ p.second); }
|
||||||
};
|
};
|
||||||
void _memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool notifyListeners) {
|
virtual void _memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool notifyListeners) {
|
||||||
|
fprintf(stderr, "PostgreSQL::_memberChanged\n");
|
||||||
DB::_memberChanged(old, memberConfig, notifyListeners);
|
DB::_memberChanged(old, memberConfig, notifyListeners);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _networkChanged(nlohmann::json &old,nlohmann::json &networkConfig,bool notifyListeners) {
|
virtual void _networkChanged(nlohmann::json &old,nlohmann::json &networkConfig,bool notifyListeners) {
|
||||||
DB::_memberChanged(old, networkConfig, notifyListeners);
|
fprintf(stderr, "PostgreSQL::_networkChanged\n");
|
||||||
|
DB::_networkChanged(old, networkConfig, notifyListeners);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Reference in a new issue