[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Apr 27 09:50:00 CDT 2011
branch "master" has been updated
via 2e4c74f5339433707eec29646d525d90be864ecc (commit)
from fd891bdc0b102fa187af0d4f44c24b1ded09c590 (commit)
Summary of changes:
src/PJSipManager.cpp | 9 ++++---
src/SipSession.cpp | 54 +++++++++++++++++++++++--------------------------
2 files changed, 30 insertions(+), 33 deletions(-)
- Log -----------------------------------------------------------------
commit 2e4c74f5339433707eec29646d525d90be864ecc
Author: Fred Anderson <fanderson at digium.com>
Date: Wed Apr 27 09:44:01 2011 -0500
Fixed warning message issues
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index 8dbd1e3..1b92c28 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -15,6 +15,7 @@
*/
#include <AsteriskSCF/logger.h>
+#include <boost/lexical_cast.hpp>
#include "PJSipManager.h"
using namespace AsteriskSCF::System::Logging;
@@ -142,7 +143,7 @@ pjsip_transport *PJSipManager::createUDPTransport(std::string address, int port)
pj_str_t udpString;
pj_cstr(&udpString, address.c_str());
pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &udpString, &udpAddr);
- pj_sockaddr_set_port(&udpAddr, port);
+ pj_sockaddr_set_port(&udpAddr, boost::lexical_cast<pj_uint16_t>(port));
pjsip_transport *udpTransport = NULL;
if (udpAddr.addr.sa_family == pj_AF_INET())
@@ -168,7 +169,7 @@ pjsip_tpfactory *PJSipManager::createTCPTransport(std::string address, int port)
pj_str_t tcpString;
pj_cstr(&tcpString, address.c_str());
pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &tcpString, &tcpAddr);
- pj_sockaddr_set_port(&tcpAddr, port);
+ pj_sockaddr_set_port(&tcpAddr, boost::lexical_cast<pj_uint16_t>(port));
pjsip_tpfactory *tcpTransport = NULL;
@@ -180,13 +181,13 @@ pjsip_tpfactory *PJSipManager::createTCPTransport(std::string address, int port)
return tcpTransport;
}
-pjsip_tpfactory *PJSipManager::createTLSTransport(std::string address, int port, pjsip_tls_setting *tlsSettings)
+pjsip_tpfactory *PJSipManager::createTLSTransport(std::string address, int port, pjsip_tls_setting *)
{
pj_sockaddr tlsAddr;
pj_str_t tlsString;
pj_cstr(&tlsString, address.c_str());
pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &tlsString, &tlsAddr);
- pj_sockaddr_set_port(&tlsAddr, port);
+ pj_sockaddr_set_port(&tlsAddr, boost::lexical_cast<pj_uint16_t>(port));
pjsip_tpfactory *tlsTransport = NULL;
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index ebf2ca5..0eafdfc 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -241,54 +241,50 @@ AsteriskSCF::SessionCommunications::V1::SessionInfoPtr SipSession::addListener(
*/
void SipSession::indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
{
- AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr connect;
- AsteriskSCF::SessionCommunications::V1::FlashIndicationPtr flash;
- AsteriskSCF::SessionCommunications::V1::HoldIndicationPtr hold;
- AsteriskSCF::SessionCommunications::V1::ProgressIndicationPtr progress;
- AsteriskSCF::SessionCommunications::V1::RingIndicationPtr ring;
- AsteriskSCF::SessionCommunications::V1::UnholdIndicationPtr unhold;
+ AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr Connect;
+ AsteriskSCF::SessionCommunications::V1::FlashIndicationPtr Flash;
+ AsteriskSCF::SessionCommunications::V1::HoldIndicationPtr Hold;
+ AsteriskSCF::SessionCommunications::V1::ProgressIndicationPtr Progress;
+ AsteriskSCF::SessionCommunications::V1::RingIndicationPtr Ring;
+ AsteriskSCF::SessionCommunications::V1::UnholdIndicationPtr Unhold;
pjsip_tx_data *packet = NULL;
pj_status_t status = -1;
- if ((connect = AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr::dynamicCast(indication)))
+ if ((Connect = AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr::dynamicCast(indication)))
{
- pjmedia_sdp_session *sdp = createSDPOffer();
- status = pjsip_inv_answer(mImplPriv->mInviteSession, 200, NULL, sdp, &packet);
+ pjmedia_sdp_session *sdp = createSDPOffer();
+ status = pjsip_inv_answer(mImplPriv->mInviteSession, 200, NULL, sdp, &packet);
}
- else if ((flash = AsteriskSCF::SessionCommunications::V1::FlashIndicationPtr::dynamicCast(indication)))
+ else if ((Flash = AsteriskSCF::SessionCommunications::V1::FlashIndicationPtr::dynamicCast(indication)))
{
- // This is usually transported using INFO or RFC2833, so for now just pretend it does not exist
+ // This is usually transported using INFO or RFC2833, so for now just pretend it does not exist
}
- else if ((hold = AsteriskSCF::SessionCommunications::V1::HoldIndicationPtr::dynamicCast(indication)))
+ else if ((Hold = AsteriskSCF::SessionCommunications::V1::HoldIndicationPtr::dynamicCast(indication)))
{
- // TODO: Update SDP with sendonly attribute and no IP
-
- // TODO: This is actually passing the hold through, we will need to support local generation
-
- status = pjsip_inv_reinvite(mImplPriv->mInviteSession, NULL, NULL, &packet);
+ // TODO: Update SDP with sendonly attribute and no IP
+ // TODO: This is actually passing the hold through, we will need to support local generation
+ status = pjsip_inv_reinvite(mImplPriv->mInviteSession, NULL, NULL, &packet);
}
- else if ((progress = AsteriskSCF::SessionCommunications::V1::ProgressIndicationPtr::dynamicCast(indication)))
+ else if ((Progress = AsteriskSCF::SessionCommunications::V1::ProgressIndicationPtr::dynamicCast(indication)))
{
- pjmedia_sdp_session *sdp = createSDPOffer();
- status = pjsip_inv_answer(mImplPriv->mInviteSession, 183, NULL, sdp, &packet);
+ pjmedia_sdp_session *sdp = createSDPOffer();
+ status = pjsip_inv_answer(mImplPriv->mInviteSession, 183, NULL, sdp, &packet);
}
- else if ((ring = AsteriskSCF::SessionCommunications::V1::RingIndicationPtr::dynamicCast(indication)))
+ else if ((Ring = AsteriskSCF::SessionCommunications::V1::RingIndicationPtr::dynamicCast(indication)))
{
- status = pjsip_inv_answer(mImplPriv->mInviteSession, 180, NULL, NULL, &packet);
+ status = pjsip_inv_answer(mImplPriv->mInviteSession, 180, NULL, NULL, &packet);
}
- else if ((unhold = AsteriskSCF::SessionCommunications::V1::UnholdIndicationPtr::dynamicCast(indication)))
+ else if ((Unhold = AsteriskSCF::SessionCommunications::V1::UnholdIndicationPtr::dynamicCast(indication)))
{
- // TODO: Update SDP with sendrecv and IP
-
- // TODO: This is actually passing the unhold through, we will need to support local generation
-
- status = pjsip_inv_reinvite(mImplPriv->mInviteSession, NULL, NULL, &packet);
+ // TODO: Update SDP with sendrecv and IP
+ // TODO: This is actually passing the unhold through, we will need to support local generation
+ status = pjsip_inv_reinvite(mImplPriv->mInviteSession, NULL, NULL, &packet);
}
// If the indication produced a packet send it out
if (status == PJ_SUCCESS)
{
- pjsip_inv_send_msg(mImplPriv->mInviteSession, packet);
+ pjsip_inv_send_msg(mImplPriv->mInviteSession, packet);
}
}
-----------------------------------------------------------------------
--
asterisk-scf/release/sip.git
More information about the asterisk-scf-commits
mailing list