From 4f9830ff2e0d27c8308226bbe2dabe834087f04a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 19 Sep 2024 15:53:54 +0100 Subject: Make the server protocol APIs use a reference instead of a pointer. --- modules/spanningtree/treeserver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/spanningtree/treeserver.cpp') diff --git a/modules/spanningtree/treeserver.cpp b/modules/spanningtree/treeserver.cpp index 871bcd578..c202685ed 100644 --- a/modules/spanningtree/treeserver.cpp +++ b/modules/spanningtree/treeserver.cpp @@ -124,7 +124,7 @@ TreeServer::TreeServer(const std::string& Name, const std::string& Desc, const s this->AddHashEntry(); Parent->Children.push_back(this); - Utils->Creator->linkeventprov.Call(&ServerProtocol::LinkEventListener::OnServerLink, this); + Utils->Creator->linkeventprov.Call(&ServerProtocol::LinkEventListener::OnServerLink, *this); } void TreeServer::BeginBurst(uint64_t startms) @@ -158,7 +158,7 @@ void TreeServer::FinishBurst() unsigned long bursttime = ts - this->StartBurst; ServerInstance->SNO.WriteToSnoMask(Parent == Utils->TreeRoot ? 'l' : 'L', "Received end of netburst from \002{}\002 (burst time: {} {})", GetName(), (bursttime > 10000 ? bursttime / 1000 : bursttime), (bursttime > 10000 ? "secs" : "msecs")); - Utils->Creator->linkeventprov.Call(&ServerProtocol::LinkEventListener::OnServerBurst, this); + Utils->Creator->linkeventprov.Call(&ServerProtocol::LinkEventListener::OnServerBurst, *this); StartBurst = 0; FinishBurstInternal(); @@ -213,7 +213,7 @@ void TreeServer::SQuitInternal(unsigned int& num_lost_servers, bool error) RemoveHash(); if (!Utils->Creator->dying) - Utils->Creator->linkeventprov.Call(&ServerProtocol::LinkEventListener::OnServerSplit, this, error); + Utils->Creator->linkeventprov.Call(&ServerProtocol::LinkEventListener::OnServerSplit, *this, error); } size_t TreeServer::QuitUsers(const std::string& reason) -- cgit v1.3.1-10-gc9f91