[asterisk-scf-commits] asterisk-scf/release/media_rtp_pjmedia.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Oct 4 16:34:21 CDT 2011
branch "master" has been updated
via 6fef5dec075436182ff4ed713ae3622e1202d109 (commit)
from 7e39c4fff270f6e75b63c6a4c016de99e2ba1673 (commit)
Summary of changes:
.../MediaRTPPJMedia/RtpStateReplicationIf.ice | 4 ----
src/Component.cpp | 14 +++-----------
src/RtpStateReplicatorListener.cpp | 1 -
test/TestRTPpjmedia.cpp | 1 -
4 files changed, 3 insertions(+), 17 deletions(-)
- Log -----------------------------------------------------------------
commit 6fef5dec075436182ff4ed713ae3622e1202d109
Author: Joshua Colp <jcolp at digium.com>
Date: Tue Oct 4 18:34:33 2011 -0300
Remove comparator ID replication that is no longer needed and do slight cleanup.
diff --git a/slice/AsteriskSCF/Replication/MediaRTPPJMedia/RtpStateReplicationIf.ice b/slice/AsteriskSCF/Replication/MediaRTPPJMedia/RtpStateReplicationIf.ice
index 3651d1d..bd0185e 100644
--- a/slice/AsteriskSCF/Replication/MediaRTPPJMedia/RtpStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/MediaRTPPJMedia/RtpStateReplicationIf.ice
@@ -70,12 +70,8 @@ module V1
class RtpGeneralStateItem extends RtpStateItem
{
AsteriskSCF::Core::Discovery::V1::ServiceManagement *serviceManagement;
- string comparatorId;
};
- /**
- * TODO: Data members in Slice defined classes should not have `m' prefixes.
- */
class RtpSessionStateItem extends RtpStateItem
{
Ice::Identity sessionIdentity;
diff --git a/src/Component.cpp b/src/Component.cpp
index abfea53..8e27eaa 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -356,8 +356,7 @@ void Component::createPrimaryServices()
if (rtpReplicationContext->isActive() == true)
{
- mGeneralState->comparatorId = IceUtil::generateUUID();
- getServiceLocatorManagement()->addCompare(mGeneralState->comparatorId, mRtpMediaComparatorServicePrx);
+ getServiceLocatorManagement()->addCompare(getName() + ".RTP.Comparator", mRtpMediaComparatorServicePrx);
}
}
@@ -533,15 +532,11 @@ void Component::onRegisterPrimaryServices()
}
mGeneralState->serviceManagement = mRtpMediaServiceRegistration->getServiceManagement();
- mGeneralState->serviceManagement->addLocatorParams(mRtpOverIceLocatorParams, mGeneralState->comparatorId);
+ mGeneralState->serviceManagement->addLocatorParams(mRtpOverIceLocatorParams, getName() + ".RTP.Comparator");
}
void Component::onStart()
{
- // Note: I don't think this is necessary. If we make the
- // comparator computed from a "service" identifier (which could default
- // to "default"), there's nothing replicated here that the standby component
- // couldn't already determine itself.
if (getReplicationContext()->isReplicating() == true)
{
RtpReplicationContextPtr rtpReplicationContext =
@@ -561,10 +556,7 @@ void Component::onStop()
mGeneralState->serviceManagement->unregister();
}
- if (!mGeneralState->comparatorId.empty())
- {
- getServiceLocatorManagement()->removeCompare(mGeneralState->comparatorId);
- }
+ getServiceLocatorManagement()->removeCompare(getName() + ".RTP.Comparator");
}
extern "C"
diff --git a/src/RtpStateReplicatorListener.cpp b/src/RtpStateReplicatorListener.cpp
index 95fbef3..ddf385d 100644
--- a/src/RtpStateReplicatorListener.cpp
+++ b/src/RtpStateReplicatorListener.cpp
@@ -98,7 +98,6 @@ public:
void visitRtpGeneralStateItem(const RtpGeneralStateItemPtr &item)
{
mImpl->mGeneralState->serviceManagement = item->serviceManagement;
- mImpl->mGeneralState->comparatorId = item->comparatorId;
}
void visitRtpSessionStateItem(const RtpSessionStateItemPtr &item)
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 6bda9b9..ab4a68f 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -454,7 +454,6 @@ BOOST_AUTO_TEST_CASE(CheckReplicatedGeneralStateItem)
BOOST_CHECK(Testbed.mListener->mGeneral);
BOOST_CHECK(Testbed.mListener->mGeneral->serviceManagement);
- BOOST_CHECK(Testbed.mListener->mGeneral->comparatorId.size());
}
/**
-----------------------------------------------------------------------
--
asterisk-scf/release/media_rtp_pjmedia.git
More information about the asterisk-scf-commits
mailing list