@@ -1893,7 +1893,7 @@ bool CConnman::AddConnection(const std::string& address, ConnectionType conn_typ
18931893 if (max_connections != std::nullopt && existing_connections >= max_connections) return false ;
18941894
18951895 // Max total outbound connections already exist
1896- CSemaphoreGrant grant (*semOutbound, true );
1896+ SemaphoreGrant grant (*semOutbound, true );
18971897 if (!grant) return false ;
18981898
18991899 OpenNetworkConnection (CAddress (), false , std::move (grant), address.c_str (), conn_type, /* use_v2transport=*/ use_v2transport);
@@ -2409,7 +2409,7 @@ void CConnman::ProcessAddrFetch()
24092409 // peer doesn't support it or immediately disconnects us for another reason.
24102410 const bool use_v2transport (GetLocalServices () & NODE_P2P_V2);
24112411 CAddress addr;
2412- CSemaphoreGrant grant (*semOutbound, /* fTry=*/ true );
2412+ SemaphoreGrant grant (*semOutbound, /* fTry=*/ true );
24132413 if (grant) {
24142414 OpenNetworkConnection (addr, false , std::move (grant), strDest.c_str (), ConnectionType::ADDR_FETCH, use_v2transport);
24152415 }
@@ -2583,7 +2583,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect, std
25832583
25842584 PerformReconnections ();
25852585
2586- CSemaphoreGrant grant (*semOutbound);
2586+ SemaphoreGrant grant (*semOutbound);
25872587 if (interruptNet)
25882588 return ;
25892589
@@ -2961,7 +2961,7 @@ void CConnman::ThreadOpenAddedConnections()
29612961 AssertLockNotHeld (m_reconnections_mutex);
29622962 while (true )
29632963 {
2964- CSemaphoreGrant grant (*semAddnode);
2964+ SemaphoreGrant grant (*semAddnode);
29652965 std::vector<AddedNodeInfo> vInfo = GetAddedNodeInfo (/* include_connected=*/ false );
29662966 bool tried = false ;
29672967 for (const AddedNodeInfo& info : vInfo) {
@@ -2974,7 +2974,7 @@ void CConnman::ThreadOpenAddedConnections()
29742974 CAddress addr (CService (), NODE_NONE);
29752975 OpenNetworkConnection (addr, false , std::move (grant), info.m_params .m_added_node .c_str (), ConnectionType::MANUAL, info.m_params .m_use_v2transport );
29762976 if (!interruptNet.sleep_for (std::chrono::milliseconds (500 ))) return ;
2977- grant = CSemaphoreGrant (*semAddnode, /* fTry=*/ true );
2977+ grant = SemaphoreGrant (*semAddnode, /* fTry=*/ true );
29782978 }
29792979 // See if any reconnections are desired.
29802980 PerformReconnections ();
@@ -2985,7 +2985,7 @@ void CConnman::ThreadOpenAddedConnections()
29852985}
29862986
29872987// if successful, this moves the passed grant to the constructed node
2988- void CConnman::OpenNetworkConnection (const CAddress& addrConnect, bool fCountFailure , CSemaphoreGrant && grant_outbound, const char *pszDest, ConnectionType conn_type, bool use_v2transport)
2988+ void CConnman::OpenNetworkConnection (const CAddress& addrConnect, bool fCountFailure , SemaphoreGrant && grant_outbound, const char *pszDest, ConnectionType conn_type, bool use_v2transport)
29892989{
29902990 AssertLockNotHeld (m_unused_i2p_sessions_mutex);
29912991 assert (conn_type != ConnectionType::INBOUND);
@@ -3336,11 +3336,11 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
33363336
33373337 if (semOutbound == nullptr ) {
33383338 // initialize semaphore
3339- semOutbound = std::make_unique<CSemaphore >(std::min (m_max_automatic_outbound, m_max_automatic_connections));
3339+ semOutbound = std::make_unique<Semaphore >(std::min (m_max_automatic_outbound, m_max_automatic_connections));
33403340 }
33413341 if (semAddnode == nullptr ) {
33423342 // initialize semaphore
3343- semAddnode = std::make_unique<CSemaphore >(m_max_addnode);
3343+ semAddnode = std::make_unique<Semaphore >(m_max_addnode);
33443344 }
33453345
33463346 //
0 commit comments