[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "configuration" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Sun Mar 20 12:22:17 CDT 2011
branch "configuration" has been updated
via dc0dbb97620670914e030aab47cf1e0f90915ef1 (commit)
from c5ed0db396867362132166c17aac2a74274bb48d (commit)
Summary of changes:
config/SipConfigurator.py | 16 ++++++++++++++++
src/SipConfiguration.cpp | 21 ++++++++++++---------
src/SipConfiguration.h | 3 +--
src/SipEndpoint.cpp | 4 ++--
4 files changed, 31 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit dc0dbb97620670914e030aab47cf1e0f90915ef1
Author: Joshua Colp <jcolp at digium.com>
Date: Sun Mar 20 11:30:25 2011 -0300
Incorporate code review feedback.
diff --git a/config/SipConfigurator.py b/config/SipConfigurator.py
index 018bdc0..d04f2ac 100755
--- a/config/SipConfigurator.py
+++ b/config/SipConfigurator.py
@@ -1,5 +1,21 @@
#!/usr/bin/env python
+#
+# Asterisk SCF -- An open-source communications framework.
+#
+# Copyright (C) 2011, Digium, Inc.
+#
+# See http://www.asterisk.org for more information about
+# the Asterisk SCF project. Please do not directly contact
+# any of the maintainers of this project for assistance;
+# the project provides a web site, mailing lists and IRC
+# channels for your use.
+#
+# This program is free software, distributed under the terms of
+# the GNU General Public License Version 2. See the LICENSE.txt file
+# at the top of the source tree.
+#
+
# Sip configurator
# Bring in the common configuration infrastructure
diff --git a/src/SipConfiguration.cpp b/src/SipConfiguration.cpp
index 713aa9c..89e6d63 100644
--- a/src/SipConfiguration.cpp
+++ b/src/SipConfiguration.cpp
@@ -1,7 +1,7 @@
/*
* Asterisk SCF -- An open-source communications framework.
*
- * Copyright (C) 2010, Digium, Inc.
+ * Copyright (C) 2011, Digium, Inc.
*
* See http://www.asterisk.org for more information about
* the Asterisk SCF project. Please do not directly contact
@@ -223,6 +223,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfiguration(const AsteriskS
public:
visitor(boost::shared_ptr<ConfigurationServiceImplPriv> implPriv, ConfigurationGroupSeq& groups) : mImplPriv(implPriv), mGroups(groups) { };
+ private:
/**
* Internal helper function which determines what configuration items should be returned
*/
@@ -344,7 +345,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfiguration(const AsteriskS
mGroups.push_back(returnedGroup);
};
- private:
+
boost::shared_ptr<ConfigurationServiceImplPriv> mImplPriv;
ConfigurationGroupSeq& mGroups;
};
@@ -368,6 +369,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfigurationAll(const Asteri
visitor(boost::shared_ptr<ConfigurationServiceImplPriv> implPriv, ConfigurationGroupSeq& groups) :
mImplPriv(implPriv), mGroups(groups) { };
+ private:
void visitSipGeneralGroup(const ::AsteriskSCF::SIP::V1::SipGeneralGroupPtr& group)
{
if (!mImplPriv->mGeneralGroup)
@@ -437,7 +439,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfigurationAll(const Asteri
mGroups.push_back((*localEndpoint).second);
};
- private:
+
boost::shared_ptr<ConfigurationServiceImplPriv> mImplPriv;
ConfigurationGroupSeq& mGroups;
};
@@ -468,7 +470,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfigurationGroups(const Ice
++group)
{
SipDomainGroupPtr domain = new SipDomainGroup();
- domain->domain = (*group).second->domain;
+ domain->domain = group->second->domain;
groups.push_back(domain);
}
@@ -477,7 +479,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfigurationGroups(const Ice
++group)
{
SipUDPTransportGroupPtr transport = new SipUDPTransportGroup();
- transport->name = (*group).second->mGroup->name;
+ transport->name = group->second->mGroup->name;
groups.push_back(transport);
}
@@ -486,7 +488,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfigurationGroups(const Ice
++group)
{
SipTCPTransportGroupPtr transport = new SipTCPTransportGroup();
- transport->name = (*group).second->mGroup->name;
+ transport->name = group->second->mGroup->name;
groups.push_back(transport);
}
@@ -495,7 +497,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfigurationGroups(const Ice
++group)
{
SipTLSTransportGroupPtr transport = new SipTLSTransportGroup();
- transport->name = (*group).second->mGroup->name;
+ transport->name = group->second->mGroup->name;
groups.push_back(transport);
}
@@ -504,7 +506,7 @@ ConfigurationGroupSeq ConfigurationServiceImpl::getConfigurationGroups(const Ice
++group)
{
SipEndpointGroupPtr endpoint = new SipEndpointGroup();
- endpoint->name = (*group).second->name;
+ endpoint->name = group->second->name;
groups.push_back(endpoint);
}
@@ -1068,6 +1070,7 @@ void ConfigurationServiceImpl::removeConfigurationGroups(const AsteriskSCF::Syst
public:
visitor(boost::shared_ptr<ConfigurationServiceImplPriv> implPriv) : mImplPriv(implPriv) { };
+ private:
void visitSipGeneralGroup(const ::AsteriskSCF::SIP::V1::SipGeneralGroupPtr& group)
{
if (!mImplPriv->mGeneralGroup)
@@ -1141,7 +1144,7 @@ void ConfigurationServiceImpl::removeConfigurationGroups(const AsteriskSCF::Syst
mImplPriv->mEndpointFactory->remove(group->name);
mImplPriv->mConfiguredEndpoints.erase(localEndpoint);
};
- private:
+
boost::shared_ptr<ConfigurationServiceImplPriv> mImplPriv;
};
diff --git a/src/SipConfiguration.h b/src/SipConfiguration.h
index d2dc2c4..5444ddd 100644
--- a/src/SipConfiguration.h
+++ b/src/SipConfiguration.h
@@ -1,7 +1,7 @@
/*
* Asterisk SCF -- An open-source communications framework.
*
- * Copyright (C) 2010, Digium, Inc.
+ * Copyright (C) 2011, Digium, Inc.
*
* See http://www.asterisk.org for more information about
* the Asterisk SCF project. Please do not directly contact
@@ -18,7 +18,6 @@
#include <Ice/Ice.h>
-#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include <AsteriskSCF/System/Component/ConfigurationIf.h>
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 9410622..f883949 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -125,14 +125,14 @@ void SipEndpoint::removeFromAdapter()
void SipEndpoint::setSourceAddress(std::string address, int port)
{
char source[64];
- pj_ansi_sprintf(source, "%s:%d", address.c_str(), port);
+ pj_ansi_snprintf(source, sizeof(source), "%s:%d", address.c_str(), port);
mImplPriv->mConfig.sessionConfig.sourceAddress = source;
}
void SipEndpoint::setTargetAddress(std::string address, int port)
{
char target[64];
- pj_ansi_sprintf(target, "%s:%d", address.c_str(), port);
+ pj_ansi_snprintf(target, sizeof(target), "%s:%d", address.c_str(), port);
mImplPriv->mConfig.transportConfig.address = target;
}
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list