From ae383cdf34fe696538e2ef3e22856b16a66c2598 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 8 Jan 2008 18:22:01 +0000 Subject: [PATCH] MAX_RTP_SESSIONS define in makefile.defs, some constructors and destructors git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@584 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmRtpReceiver.cpp | 3 +++ core/AmSipDispatcher.cpp | 2 +- core/AmSipMsg.h | 9 ++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/AmRtpReceiver.cpp b/core/AmRtpReceiver.cpp index f7cb1f3d..591598cd 100644 --- a/core/AmRtpReceiver.cpp +++ b/core/AmRtpReceiver.cpp @@ -35,7 +35,10 @@ #include #include +#ifndef MAX_RTP_SESSIONS #define MAX_RTP_SESSIONS 2048 +#endif + #define RTP_POLL_TIMEOUT 50 /*50 ms*/ diff --git a/core/AmSipDispatcher.cpp b/core/AmSipDispatcher.cpp index afbb0615..3c0058b8 100644 --- a/core/AmSipDispatcher.cpp +++ b/core/AmSipDispatcher.cpp @@ -42,7 +42,7 @@ void AmSipDispatcher::handleSipMsg(AmSipRequest &req) if(!sess_exists){ DBG("method: `%s' [%zd].\n", req.method.c_str(), req.method.length()); - DBG("method: `%s' [%zd].\n", string("INVITE").c_str(), string("INVITE").length()); + if((req.method == "INVITE")|| ((req.method == "REFER") && !local_tag.empty())){ sess_cont->startSessionUAS(req); diff --git a/core/AmSipMsg.h b/core/AmSipMsg.h index e1f80ed4..bc08547f 100644 --- a/core/AmSipMsg.h +++ b/core/AmSipMsg.h @@ -21,7 +21,8 @@ class _AmSipMsgInDlg string serKey; - _AmSipMsgInDlg() : cseq(0) {} + _AmSipMsgInDlg() : cseq(0) { } + ~_AmSipMsgInDlg() { } }; /** \brief represents a SIP reply */ @@ -34,7 +35,8 @@ struct AmSipReply : public _AmSipMsgInDlg string remote_tag; string local_tag; - AmSipReply() : code(0), _AmSipMsgInDlg() {} + AmSipReply() : code(0), _AmSipMsgInDlg() { } + ~AmSipReply() { } }; @@ -56,7 +58,8 @@ class AmSipRequest : public _AmSipMsgInDlg string from_tag; string to_tag; - AmSipRequest() : _AmSipMsgInDlg() {} + AmSipRequest() : _AmSipMsgInDlg() { } + ~AmSipRequest() { } }; string getHeader(const string& hdrs,const string& hdr_name);