r3574 - in trunk/libmsip: include/libmsip source source/headers
erik at minisip.org
erik at minisip.org
Thu Apr 17 17:19:18 CEST 2008
Author: erik
Date: 2008-04-17 17:19:17 +0200 (Thu, 17 Apr 2008)
New Revision: 3574
Modified:
trunk/libmsip/include/libmsip/SipStack.h
trunk/libmsip/source/SipCommandDispatcher.cxx
trunk/libmsip/source/SipCommandDispatcher.h
trunk/libmsip/source/SipStack.cxx
trunk/libmsip/source/SipStackInternal.cxx
trunk/libmsip/source/SipStackInternal.h
trunk/libmsip/source/headers/SipHeaderProxyAuthorization.cxx
Log:
* Added the possibility to receive the "transaction_terminated" messages
in the TU layer. They were only available to the dispather, but can be
of interest to applications as well.
* Removed include that was not used
Modified: trunk/libmsip/include/libmsip/SipStack.h
===================================================================
--- trunk/libmsip/include/libmsip/SipStack.h 2008-04-16 13:44:53 UTC (rev 3573)
+++ trunk/libmsip/include/libmsip/SipStack.h 2008-04-17 15:19:17 UTC (rev 3574)
@@ -334,6 +334,8 @@
std::string getStackStatusDebugString();
+ void setInformTransactionTerminate(bool doInform);
+
private:
friend class SipDialog;
void *sipStackInternal; // This is pointer to a MRef<SipStackInternal*> sipStackInternal
Modified: trunk/libmsip/source/SipCommandDispatcher.cxx
===================================================================
--- trunk/libmsip/source/SipCommandDispatcher.cxx 2008-04-16 13:44:53 UTC (rev 3573)
+++ trunk/libmsip/source/SipCommandDispatcher.cxx 2008-04-17 15:19:17 UTC (rev 3574)
@@ -303,6 +303,15 @@
t=NULL;
transactionLayer->removeTransaction(tid);
MRef<SipDialog*> d = dialogLayer->getDialog(cid);
+
+ if (informTuOnTransactionTerminate){
+ SipSMCommand tterm(
+ CommandString( cid, SipCommandString::transaction_terminated, tid ),
+ SipSMCommand::transaction_layer,
+ SipSMCommand::dialog_layer
+ );
+ }
+
//It is ok to not find a dialog (transaction
//without dialog).
if (d){
Modified: trunk/libmsip/source/SipCommandDispatcher.h
===================================================================
--- trunk/libmsip/source/SipCommandDispatcher.h 2008-04-16 13:44:53 UTC (rev 3573)
+++ trunk/libmsip/source/SipCommandDispatcher.h 2008-04-17 15:19:17 UTC (rev 3574)
@@ -105,6 +105,17 @@
Needs to be moved to private and use set/get functions
*/
MRef<SipDialog*> managementHandler;
+
+ /**
+ * If set to true, the SipStack will send the following SipSMCommand from
+ * the transaction_layer to the dialog_layer:
+ * op=transaction_terminated
+ * param=transaction id
+ * This makes it possible for applications to know when a
+ * transaction has terminated, and is/will be removed from
+ * memory.
+ */
+ void setInformTransactionTerminate(bool doInform){informTuOnTransactionTerminate=doInform;}
private:
MRef<CommandReceiver*> callback;
@@ -133,6 +144,14 @@
*/
bool keepRunning;
+ /**
+ * If true, the SipStack will send the following SipSMCommand from
+ * the transaction_layer to the dialog_layer:
+ * op=transaction_terminated
+ * param=transaction id
+ */
+ bool informTuOnTransactionTerminate;
+
};
#include<libmsip/SipDialog.h>
Modified: trunk/libmsip/source/SipStack.cxx
===================================================================
--- trunk/libmsip/source/SipStack.cxx 2008-04-16 13:44:53 UTC (rev 3573)
+++ trunk/libmsip/source/SipStack.cxx 2008-04-17 15:19:17 UTC (rev 3574)
@@ -193,3 +193,8 @@
std::string SipStack::createClientTransaction(MRef<SipRequest*> req){
return STACK->createClientTransaction(req);
}
+
+void SipStack::setInformTransactionTerminate(bool doInform){
+ return STACK->setInformTransactionTerminate(doInform);
+}
+
Modified: trunk/libmsip/source/SipStackInternal.cxx
===================================================================
--- trunk/libmsip/source/SipStackInternal.cxx 2008-04-16 13:44:53 UTC (rev 3573)
+++ trunk/libmsip/source/SipStackInternal.cxx 2008-04-17 15:19:17 UTC (rev 3574)
@@ -576,3 +576,9 @@
std::string SipStackInternal::createClientTransaction(MRef<SipRequest*> req){
return dispatcher->getLayerTransaction()->createClientTransaction(req);
}
+
+void SipStackInternal::setInformTransactionTerminate(bool doInform){
+ return dispatcher->setInformTransactionTerminate(doInform);
+}
+
+
Modified: trunk/libmsip/source/SipStackInternal.h
===================================================================
--- trunk/libmsip/source/SipStackInternal.h 2008-04-16 13:44:53 UTC (rev 3573)
+++ trunk/libmsip/source/SipStackInternal.h 2008-04-17 15:19:17 UTC (rev 3574)
@@ -105,6 +105,8 @@
std::string createClientTransaction(MRef<SipRequest*>);
+ void setInformTransactionTerminate(bool doInform);
+
protected:
void startSipServers();
void startSipsServers();
Modified: trunk/libmsip/source/headers/SipHeaderProxyAuthorization.cxx
===================================================================
--- trunk/libmsip/source/headers/SipHeaderProxyAuthorization.cxx 2008-04-16 13:44:53 UTC (rev 3573)
+++ trunk/libmsip/source/headers/SipHeaderProxyAuthorization.cxx 2008-04-17 15:19:17 UTC (rev 3574)
@@ -33,7 +33,6 @@
#include<config.h>
#include<libmsip/SipHeaderProxyAuthorization.h>
-#include<libmutil/vmd5.h>
using namespace std;
More information about the Minisip-devel
mailing list