From d6d46afd115bcc15ebbe9bd667fdec02d85d4a80 Mon Sep 17 00:00:00 2001 From: Jeremy Friesner Date: Tue, 23 Apr 2024 17:17:29 -0700 Subject: [PATCH] Updated muscle submodule, and replaced newnothrow calls with new --- demos/choir/ChoirSession.cpp | 9 +++--- demos/fridge/server/FridgeServerProcess.cpp | 23 ++------------- src/ZGPeerSession.cpp | 3 +- src/ZGStdinSession.cpp | 8 ++---- src/connector/ClientConnector.cpp | 16 ++++------- .../client/SystemDiscoveryClient.cpp | 9 ++---- .../server/DiscoveryServerSession.cpp | 3 +- src/messagetree/gateway/MuxTreeGateway.cpp | 7 ++--- .../server/ServerSideMessageTreeSession.cpp | 3 +- src/private/PZGHeartbeatSettings.cpp | 8 ++---- src/private/PZGHeartbeatSourceState.cpp | 3 +- src/private/PZGHeartbeatThreadState.cpp | 3 +- src/private/PZGNetworkIOSession.cpp | 28 ++++++------------- src/private/PZGThreadedSession.cpp | 4 +-- src/udp/UDPMulticastTransceiver.cpp | 16 ++++------- submodules/muscle | 2 +- tests/tree_server.cpp | 4 +-- 17 files changed, 46 insertions(+), 103 deletions(-) diff --git a/demos/choir/ChoirSession.cpp b/demos/choir/ChoirSession.cpp index d18b069..583af69 100644 --- a/demos/choir/ChoirSession.cpp +++ b/demos/choir/ChoirSession.cpp @@ -234,12 +234,11 @@ IDatabaseObjectRef ChoirSession :: CreateDatabaseObject(uint32 whichDatabase) IDatabaseObjectRef ret; switch(whichDatabase) { - case CHOIR_DATABASE_SCORE: ret.SetRef(newnothrow MusicSheet( this, whichDatabase)); break; - case CHOIR_DATABASE_PLAYBACKSTATE: ret.SetRef(newnothrow PlaybackState( this, whichDatabase)); break; - case CHOIR_DATABASE_ROSTER: ret.SetRef(newnothrow NoteAssignmentsMap(this, whichDatabase)); break; - default: /* empty */ break; + case CHOIR_DATABASE_SCORE: ret.SetRef(new MusicSheet( this, whichDatabase)); break; + case CHOIR_DATABASE_PLAYBACKSTATE: ret.SetRef(new PlaybackState( this, whichDatabase)); break; + case CHOIR_DATABASE_ROSTER: ret.SetRef(new NoteAssignmentsMap(this, whichDatabase)); break; + default: /* empty */ break; } - if (ret() == NULL) MWARN_OUT_OF_MEMORY; return ret; } diff --git a/demos/fridge/server/FridgeServerProcess.cpp b/demos/fridge/server/FridgeServerProcess.cpp index 52c02db..d71cc19 100644 --- a/demos/fridge/server/FridgeServerProcess.cpp +++ b/demos/fridge/server/FridgeServerProcess.cpp @@ -123,26 +123,9 @@ class FridgePeerSession : public MessageTreeDatabasePeerSession { switch(whichDatabase) { - case FRIDGE_DB_PROJECT: - { - IDatabaseObjectRef ret(newnothrow MagnetsMessageTreeDatabaseObject(this, whichDatabase, "project")); - if (ret() == NULL) MWARN_OUT_OF_MEMORY; - return ret; - } - - case FRIDGE_DB_CHAT: - { - IDatabaseObjectRef ret(newnothrow MessageTreeDatabaseObject(this, whichDatabase, "chat")); - if (ret() == NULL) MWARN_OUT_OF_MEMORY; - return ret; - } - - case FRIDGE_DB_CLIENTS: - { - IDatabaseObjectRef ret(newnothrow ClientDataMessageTreeDatabaseObject(this, whichDatabase, "clients")); - if (ret() == NULL) MWARN_OUT_OF_MEMORY; - return ret; - } + case FRIDGE_DB_PROJECT: return IDatabaseObjectRef(new MagnetsMessageTreeDatabaseObject( this, whichDatabase, "project")); + case FRIDGE_DB_CHAT: return IDatabaseObjectRef(new MessageTreeDatabaseObject( this, whichDatabase, "chat")); + case FRIDGE_DB_CLIENTS: return IDatabaseObjectRef(new ClientDataMessageTreeDatabaseObject(this, whichDatabase, "clients")); default: LogTime(MUSCLE_LOG_CRITICALERROR, "FridgePeerSession::CreateDatabaseObject(" UINT32_FORMAT_SPEC "): Unknown database ID!\n", whichDatabase); diff --git a/src/ZGPeerSession.cpp b/src/ZGPeerSession.cpp index 9b30ec5..14c583d 100644 --- a/src/ZGPeerSession.cpp +++ b/src/ZGPeerSession.cpp @@ -98,8 +98,7 @@ status_t ZGPeerSession :: AttachedToServer() { MRETURN_ON_ERROR(StorageReflectSession::AttachedToServer()); - PZGNetworkIOSessionRef ioSessionRef(newnothrow PZGNetworkIOSession(_peerSettings, _localPeerID, this)); - MRETURN_OOM_ON_NULL(ioSessionRef()); + PZGNetworkIOSessionRef ioSessionRef(new PZGNetworkIOSession(_peerSettings, _localPeerID, this)); MRETURN_ON_ERROR(AddNewSession(ioSessionRef)); _networkIOSession = ioSessionRef; diff --git a/src/ZGStdinSession.cpp b/src/ZGStdinSession.cpp index 018d224..c980174 100644 --- a/src/ZGStdinSession.cpp +++ b/src/ZGStdinSession.cpp @@ -14,9 +14,7 @@ ZGStdinSession :: ZGStdinSession(ITextCommandReceiver & target, bool endServerOn DataIORef ZGStdinSession :: CreateDataIO(const ConstSocketRef &) { - DataIO * dio = newnothrow StdinDataIO(false); - MRETURN_OOM_ON_NULL(dio); - return DataIORef(dio); + return DataIORef(new StdinDataIO(false)); } bool ZGStdinSession :: IsReallyStdin() const @@ -46,9 +44,7 @@ bool ZGStdinSession :: IsReadyForInput() const AbstractMessageIOGatewayRef ZGStdinSession :: CreateGateway() { - AbstractMessageIOGateway * gw = newnothrow PlainTextMessageIOGateway; - MRETURN_OOM_ON_NULL(gw); - return AbstractMessageIOGatewayRef(gw); + return AbstractMessageIOGatewayRef(new PlainTextMessageIOGateway); } void ZGStdinSession :: MessageReceivedFromGateway(const MessageRef & msg, void * /*ptr*/) diff --git a/src/connector/ClientConnector.cpp b/src/connector/ClientConnector.cpp index 260e7c0..992b41f 100644 --- a/src/connector/ClientConnector.cpp +++ b/src/connector/ClientConnector.cpp @@ -84,9 +84,7 @@ class UDPTimeSyncSession : public AbstractReflectSession virtual DataIORef CreateDataIO(const ConstSocketRef & socket) { - UDPSocketDataIORef dio(newnothrow UDPSocketDataIO(socket, false)); - MRETURN_OOM_ON_NULL(dio()); - + UDPSocketDataIORef dio(new UDPSocketDataIO(socket, false)); (void) dio()->SetPacketSendDestination(_timeSyncDest); return dio; } @@ -161,8 +159,7 @@ class TCPConnectorSession : public AbstractReflectSession if (_timeSyncDest.IsValid()) { - _timeSyncSession.SetRef(newnothrow UDPTimeSyncSession(this, _timeSyncDest)); - MRETURN_OOM_ON_NULL(_timeSyncSession()); + _timeSyncSession.SetRef(new UDPTimeSyncSession(this, _timeSyncDest)); MRETURN_ON_ERROR(AddNewSession(_timeSyncSession)); } @@ -220,8 +217,7 @@ class TCPConnectorSession : public AbstractReflectSession virtual AbstractMessageIOGatewayRef CreateGateway() { - MessageIOGatewayRef ret(newnothrow MessageIOGateway()); - MRETURN_OOM_ON_NULL(ret()); + MessageIOGatewayRef ret(new MessageIOGateway()); ret()->SetAboutToFlattenMessageCallback(WatchForLocalPingMessagesCallbackFunc, this); return ret; } @@ -384,10 +380,10 @@ class ClientConnectorImplementation : private Thread, private IDiscoveryNotifica _isActive = true; // This is the filter the DiscoveryModule will actually use (it's a superset of the _optAdditionalDiscoveryCriteria because it also specifies what system name(s) we will accept) - _discoFilterRef.SetRef(newnothrow StringQueryFilter(ZG_DISCOVERY_NAME_SYSTEMNAME, StringQueryFilter::OP_SIMPLE_WILDCARD_MATCH, _systemNamePattern)); - if ((_discoFilterRef())&&(_optAdditionalDiscoveryCriteria())) _discoFilterRef.SetRef(newnothrow AndQueryFilter(_discoFilterRef, _optAdditionalDiscoveryCriteria)); + _discoFilterRef.SetRef(new StringQueryFilter(ZG_DISCOVERY_NAME_SYSTEMNAME, StringQueryFilter::OP_SIMPLE_WILDCARD_MATCH, _systemNamePattern)); + if (_optAdditionalDiscoveryCriteria()) _discoFilterRef.SetRef(new AndQueryFilter(_discoFilterRef, _optAdditionalDiscoveryCriteria)); - const status_t ret = _discoFilterRef() ? StartInternalThread() : B_OUT_OF_MEMORY; + const status_t ret = StartInternalThread(); if (ret.IsError()) Stop(); // roll back the state we set above return ret; } diff --git a/src/discovery/client/SystemDiscoveryClient.cpp b/src/discovery/client/SystemDiscoveryClient.cpp index b9efe36..7f43c9e 100644 --- a/src/discovery/client/SystemDiscoveryClient.cpp +++ b/src/discovery/client/SystemDiscoveryClient.cpp @@ -111,9 +111,7 @@ class DiscoveryClientManagerSession : public AbstractReflectSession, public INet virtual AbstractMessageIOGatewayRef CreateGateway() { - AbstractMessageIOGatewayRef ret(newnothrow SignalMessageIOGateway()); - MRETURN_OOM_ON_NULL(ret()); - return ret; + return AbstractMessageIOGatewayRef(new SignalMessageIOGateway()); } virtual status_t AttachedToServer() @@ -228,10 +226,9 @@ class DiscoveryClientManagerSession : public AbstractReflectSession, public INet { // Use a different socket for each IP address, to avoid Mac routing problems const IPAddressAndPort & iap = iter.GetKey(); + DiscoverySessionRef ldsRef(new DiscoverySession(iap, this)); status_t ret; - DiscoverySessionRef ldsRef(newnothrow DiscoverySession(iap, this)); - if (ldsRef() == NULL) MWARN_OUT_OF_MEMORY; - else if (AddNewSession(ldsRef).IsError(ret)) LogTime(MUSCLE_LOG_ERROR, "Could not create discovery session for [%s] [%s]\n", iap.ToString()(), ret()); + if (AddNewSession(ldsRef).IsError(ret)) LogTime(MUSCLE_LOG_ERROR, "Could not create discovery session for [%s] [%s]\n", iap.ToString()(), ret()); } } } diff --git a/src/discovery/server/DiscoveryServerSession.cpp b/src/discovery/server/DiscoveryServerSession.cpp index f5c7760..029706a 100644 --- a/src/discovery/server/DiscoveryServerSession.cpp +++ b/src/discovery/server/DiscoveryServerSession.cpp @@ -58,8 +58,7 @@ void DiscoveryServerSession :: NetworkInterfacesChanged(const HashtableTreeGatewayConnectionStateChanged(); // let him know we are connected to the server already } @@ -477,14 +477,13 @@ status_t MuxTreeGateway :: UpdateSubscription(const String & subscriptionPath, I if (unionFilter()) oqf = const_cast(static_cast(unionFilter())); else { - oqf = newnothrow OrQueryFilter; + oqf = new OrQueryFilter; if (oqf) { unionFilter.SetRef(oqf); (void) oqf->GetChildren().AddTail(sendFilter); sendFilter = unionFilter; } - else MWARN_OUT_OF_MEMORY; } if (oqf) (void) oqf->GetChildren().AddTail(nextFilter); } diff --git a/src/messagetree/server/ServerSideMessageTreeSession.cpp b/src/messagetree/server/ServerSideMessageTreeSession.cpp index 3371b01..fea821f 100644 --- a/src/messagetree/server/ServerSideMessageTreeSession.cpp +++ b/src/messagetree/server/ServerSideMessageTreeSession.cpp @@ -126,8 +126,7 @@ ServerSideMessageTreeSessionFactory :: ServerSideMessageTreeSessionFactory(ITree AbstractReflectSessionRef ServerSideMessageTreeSessionFactory :: CreateSession(const String & /*clientAddress*/, const IPAddressAndPort & /*factoryInfo*/) { - ServerSideMessageTreeSessionRef ret(newnothrow ServerSideMessageTreeSession(GetGateway())); - MRETURN_OOM_ON_NULL(ret()); + ServerSideMessageTreeSessionRef ret(new ServerSideMessageTreeSession(GetGateway())); ret()->SetLogOnAttachAndDetach(_announceClientConnectsAndDisconnects); return ret; } diff --git a/src/private/PZGHeartbeatSettings.cpp b/src/private/PZGHeartbeatSettings.cpp index 68822cd..ce90a98 100644 --- a/src/private/PZGHeartbeatSettings.cpp +++ b/src/private/PZGHeartbeatSettings.cpp @@ -80,8 +80,7 @@ static UDPSocketDataIORef CreateMulticastDataIO(const IPAddressAndPort & multica { if (AddSocketToMulticastGroup(udpSock, multicastIAP.GetIPAddress()).IsOK(ret)) { - UDPSocketDataIORef ret(newnothrow UDPSocketDataIO(udpSock, false)); - MRETURN_OOM_ON_NULL(ret()); + UDPSocketDataIORef ret(new UDPSocketDataIO(udpSock, false)); (void) ret()->SetPacketSendDestination(multicastIAP); return ret; } @@ -149,13 +148,12 @@ Queue PZGHeartbeatSettings :: CreateMulticastDataIOs(bool isFor { case MULTICAST_MODE_SIMULATED: { - SimulatedMulticastDataIORef wifiIO(newnothrow SimulatedMulticastDataIO(IPAddressAndPort(MungeMulticastAddress(nextMulticastAddress), udpPort))); - if ((wifiIO())&&(ret.AddTail(wifiIO).IsOK())) + SimulatedMulticastDataIORef wifiIO(new SimulatedMulticastDataIO(IPAddressAndPort(MungeMulticastAddress(nextMulticastAddress), udpPort))); + if (ret.AddTail(wifiIO).IsOK()) { LogTime(MUSCLE_LOG_DEBUG, "Using SimulatedMulticastDataIO for %s on %s interface [%s]\n", dataDesc, ifTypeDesc, nii.ToString()()); (void) iidxQ.AddTail(iidx); } - else MWARN_OUT_OF_MEMORY; } break; diff --git a/src/private/PZGHeartbeatSourceState.cpp b/src/private/PZGHeartbeatSourceState.cpp index beefd83..c5dafa5 100644 --- a/src/private/PZGHeartbeatSourceState.cpp +++ b/src/private/PZGHeartbeatSourceState.cpp @@ -15,8 +15,7 @@ status_t PZGHeartbeatSourceState :: AddMeasurement(const IPAddressAndPort & mult PZGRoundTripTimeAveragerRef * rtt = _rttAveragers.Get(multicastAddr); if (rtt == NULL) { - PZGRoundTripTimeAveragerRef r(newnothrow PZGRoundTripTimeAverager(_maxMeasurements)); - MRETURN_OOM_ON_NULL(r()); + PZGRoundTripTimeAveragerRef r(new PZGRoundTripTimeAverager(_maxMeasurements)); rtt = _rttAveragers.PutAndGet(multicastAddr, r); MRETURN_OOM_ON_NULL(rtt); diff --git a/src/private/PZGHeartbeatThreadState.cpp b/src/private/PZGHeartbeatThreadState.cpp index 314fb15..00501e6 100644 --- a/src/private/PZGHeartbeatThreadState.cpp +++ b/src/private/PZGHeartbeatThreadState.cpp @@ -627,8 +627,7 @@ void PZGHeartbeatThreadState :: ExpireSource(const PZGHeartbeatSourceKey & sourc void PZGHeartbeatThreadState :: IntroduceSource(const PZGHeartbeatSourceKey & source, const PZGHeartbeatPacketWithMetaDataRef & newHB, uint64 localExpirationTimeMicros) { - PZGHeartbeatSourceStateRef newSource(newnothrow PZGHeartbeatSourceState(20)); - if (newSource() == NULL) {MWARN_OUT_OF_MEMORY; return;} + PZGHeartbeatSourceStateRef newSource(new PZGHeartbeatSourceState(20)); newSource()->SetHeartbeatPacket(newHB, localExpirationTimeMicros); if (_onlineSources.Put(source, newSource).IsOK()) diff --git a/src/private/PZGNetworkIOSession.cpp b/src/private/PZGNetworkIOSession.cpp index 96ed7d5..50fcd64 100644 --- a/src/private/PZGNetworkIOSession.cpp +++ b/src/private/PZGNetworkIOSession.cpp @@ -99,9 +99,7 @@ class PZGUnicastSessionFactory : public ReflectSessionFactory virtual AbstractReflectSessionRef CreateSession(const String & /*clientAddress*/, const IPAddressAndPort & /*factoryInfo*/) { - PZGUnicastSessionRef ret(newnothrow PZGUnicastSession(_master, ZGPeerID())); - MRETURN_OOM_ON_NULL(ret()); - return ret; + return AbstractReflectSessionRef(new PZGUnicastSession(_master, ZGPeerID())); } private: @@ -182,18 +180,15 @@ void PZGNetworkIOSession :: MessageReceivedFromInternalThread(const MessageRef & status_t PZGNetworkIOSession :: AttachedToServer() { - PZGUnicastSessionFactoryRef unicastTCPFactoryRef(newnothrow PZGUnicastSessionFactory(this)); - MRETURN_OOM_ON_NULL(unicastTCPFactoryRef()); + PZGUnicastSessionFactoryRef unicastTCPFactoryRef(new PZGUnicastSessionFactory(this)); uint16 tcpAcceptPort; MRETURN_ON_ERROR(PutAcceptFactory(0, unicastTCPFactoryRef, invalidIP, &tcpAcceptPort)); - _hbSettings.SetRef(newnothrow PZGHeartbeatSettings(_peerSettings, _localPeerID, tcpAcceptPort)); - if (_hbSettings() == NULL) {(void) RemoveAcceptFactory(tcpAcceptPort); MRETURN_OUT_OF_MEMORY;} + _hbSettings.SetRef(new PZGHeartbeatSettings(_peerSettings, _localPeerID, tcpAcceptPort)); LogTime(MUSCLE_LOG_DEBUG, "This peer's ZGPeerID is: [%s]\n", GetLocalPeerID().ToString()()); - DetectNetworkConfigChangesSessionRef dnccSessionRef(newnothrow DetectNetworkConfigChangesSession); - MRETURN_OOM_ON_NULL(dnccSessionRef()); + DetectNetworkConfigChangesSessionRef dnccSessionRef(new DetectNetworkConfigChangesSession); status_t ret; if (AddNewSession(dnccSessionRef).IsError(ret)) @@ -211,8 +206,7 @@ status_t PZGNetworkIOSession :: AttachedToServer() status_t PZGNetworkIOSession :: SetupHeartbeatSession() { - PZGHeartbeatSessionRef hbSessionRef(newnothrow PZGHeartbeatSession(_hbSettings, this)); - MRETURN_OOM_ON_NULL(hbSessionRef()); + PZGHeartbeatSessionRef hbSessionRef(new PZGHeartbeatSession(_hbSettings, this)); status_t ret; if (AddNewSession(hbSessionRef).IsError(ret)) @@ -386,13 +380,8 @@ void PZGNetworkIOSession :: InternalThreadEntry() PacketDataIORef & dio = dios[i]; if (RegisterInternalThreadSocket(dio()->GetReadSelectSocket(), SOCKET_SET_READ).IsError()) LogTime(MUSCLE_LOG_ERROR, "PZGNetworkIOSession: Couldn't register DataIO # " UINT32_FORMAT_SPEC " for input!\n", i); - PacketTunnelIOGatewayRef ptRef(newnothrow PacketTunnelIOGateway); - if ((ptRef())&&(ptGateways.AddTail(ptRef).IsOK())) ptRef()->SetDataIO(dio); - else - { - LogTime(MUSCLE_LOG_ERROR, "Couldn't create PacketTunnelIOGateway for DataIO #" UINT32_FORMAT_SPEC "\n", i); - (void) dios.RemoveItemAt(i--); // no point in keeping it around if we can't have a gateway for it - } + PacketTunnelIOGatewayRef ptRef(new PacketTunnelIOGateway); + if (ptGateways.AddTail(ptRef).IsOK()) ptRef()->SetDataIO(dio); } } else LogTime(MUSCLE_LOG_ERROR, "PZGNetworkIOSession: Couldn't create Multicast DataIOs!\n"); @@ -591,8 +580,7 @@ PZGUnicastSessionRef PZGNetworkIOSession :: GetUnicastSessionForPeerID(const ZGP return B_DATA_NOT_FOUND; } - PZGUnicastSessionRef usRef(newnothrow PZGUnicastSession(this, peerID)); - MRETURN_OOM_ON_NULL(usRef()); + PZGUnicastSessionRef usRef(new PZGUnicastSession(this, peerID)); status_t ret; if (AddNewConnectSession(usRef, iap, MUSCLE_TIME_NEVER, SecondsToMicros(5)).IsError(ret)) diff --git a/src/private/PZGThreadedSession.cpp b/src/private/PZGThreadedSession.cpp index c96ae17..db7c45d 100644 --- a/src/private/PZGThreadedSession.cpp +++ b/src/private/PZGThreadedSession.cpp @@ -17,9 +17,7 @@ ConstSocketRef PZGThreadedSession :: CreateDefaultSocket() AbstractMessageIOGatewayRef PZGThreadedSession :: CreateGateway() { - SignalMessageIOGatewayRef gwRef(newnothrow SignalMessageIOGateway); - MRETURN_OOM_ON_NULL(gwRef()); - return gwRef; + return AbstractMessageIOGatewayRef(new SignalMessageIOGateway); } status_t PZGThreadedSession :: AttachedToServer() diff --git a/src/udp/UDPMulticastTransceiver.cpp b/src/udp/UDPMulticastTransceiver.cpp index a4613e4..e6707c8 100644 --- a/src/udp/UDPMulticastTransceiver.cpp +++ b/src/udp/UDPMulticastTransceiver.cpp @@ -43,9 +43,8 @@ class MulticastUDPSession : public AbstractReflectSession virtual DataIORef CreateDataIO(const ConstSocketRef & s) { PacketDataIO * udpIO; - if (_useSimulatedMulticast) udpIO = newnothrow SimulatedMulticastDataIO(_multicastIAP); - else udpIO = newnothrow UDPSocketDataIO(s, false); - MRETURN_OOM_ON_NULL(udpIO); + if (_useSimulatedMulticast) udpIO = new SimulatedMulticastDataIO(_multicastIAP); + else udpIO = new UDPSocketDataIO(s, false); DataIORef ret(udpIO); (void) udpIO->SetPacketSendDestination(_multicastIAP); @@ -141,9 +140,7 @@ class MulticastUDPClientManagerSession : public AbstractReflectSession, public I virtual AbstractMessageIOGatewayRef CreateGateway() { - AbstractMessageIOGatewayRef ret(newnothrow SignalMessageIOGateway()); - MRETURN_OOM_ON_NULL(ret()); - return ret; + return AbstractMessageIOGatewayRef(new SignalMessageIOGateway()); } virtual status_t AttachedToServer() @@ -239,11 +236,10 @@ class MulticastUDPClientManagerSession : public AbstractReflectSession, public I if (useSimulatedMulticast) iap.SetPort(iap.GetPort()+100); // just to keep SimulatedMulticastDataIO control-packets from leaking into the user's standard-multicast receivers // Use a different socket for each IP address, to avoid Mac routing problems - status_t ret; - MulticastUDPSessionRef msRef(newnothrow MulticastUDPSession(useSimulatedMulticast, iap, this)); + MulticastUDPSessionRef msRef(new MulticastUDPSession(useSimulatedMulticast, iap, this)); - if (msRef() == NULL) MWARN_OUT_OF_MEMORY; - else if (AddNewSession(msRef).IsOK(ret)) + status_t ret; + if (AddNewSession(msRef).IsOK(ret)) { const int iidx = iap.GetIPAddress().GetInterfaceIndex(); if (_udpSessions.ContainsKey(iidx)) LogTime(MUSCLE_LOG_CRITICALERROR, "MulticastUDPClientManagerSession: Multiple UDP sessions have the same interface index %i!\n", iidx); diff --git a/submodules/muscle b/submodules/muscle index b12768c..f1b812f 160000 --- a/submodules/muscle +++ b/submodules/muscle @@ -1 +1 @@ -Subproject commit b12768c8d27b8b3abdf46a1a006d82815688007c +Subproject commit f1b812fbad5d452d86205b2d3fb15033da1d7462 diff --git a/tests/tree_server.cpp b/tests/tree_server.cpp index 296f960..de7dbd2 100644 --- a/tests/tree_server.cpp +++ b/tests/tree_server.cpp @@ -108,9 +108,7 @@ class TestTreeZGPeerSession : public MessageTreeDatabasePeerSession protected: virtual IDatabaseObjectRef CreateDatabaseObject(uint32 whichDatabase) { - IDatabaseObjectRef ret(newnothrow MessageTreeDatabaseObject(this, whichDatabase, GetDatabaseRootPath(whichDatabase))); - if (ret() == NULL) MWARN_OUT_OF_MEMORY; - return ret; + return IDatabaseObjectRef(new MessageTreeDatabaseObject(this, whichDatabase, GetDatabaseRootPath(whichDatabase))); } private: