summaryrefslogtreecommitdiff
path: root/src/network.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-08-13 19:42:02 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-08-13 21:29:05 +0200
commite7687e020f6d31a22aadb08aa73ae000796ae139 (patch)
treec7072d2d9949245cdbc48c7cd3bb934b169a4f11 /src/network.h
parenta4d433bf79ad4f4cb99dc9d5b632ea9cff054a91 (diff)
Server: avoid executing callbacks while holding locks
Diffstat (limited to 'src/network.h')
-rw-r--r--src/network.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network.h b/src/network.h
index d1fae15..12ec4e1 100644
--- a/src/network.h
+++ b/src/network.h
@@ -57,10 +57,10 @@ struct Server::Peer
shared_ptr<erebos::Peer::Priv> lpeer = nullptr;
- void updateIdentity(ReplyBuilder &);
+ void updateIdentity(ReplyBuilder &, vector<shared_ptr<erebos::Peer::Priv>> & notifyPeers);
void updateChannel(ReplyBuilder &);
void finalizeChannel(ReplyBuilder &, unique_ptr<Channel>);
- void updateService(ReplyBuilder &);
+ void updateService(ReplyBuilder &, vector<tuple<shared_ptr<erebos::Peer::Priv>, Service &, Ref>> & readyServices);
};
struct Peer::Priv : enable_shared_from_this<Peer::Priv>
@@ -70,6 +70,7 @@ struct Peer::Priv : enable_shared_from_this<Peer::Priv>
size_t listIndex;
void notifyWatchers();
+ void runServicesHandler(Service & service, Ref ref);
};
struct PeerList::Priv : enable_shared_from_this<PeerList::Priv>