Module: sems
Branch: master
Commit: 466e8ac10c297a15ca555aebe67070d3cc927d40
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=466e8ac10c297a15ca555aebe67070d3cc927d40

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Sat Feb  4 16:40:07 2012 +0100

core: removed outbound interface parameter for replies.

---

 core/AmSipDialog.cpp      |   10 ++++------
 core/AmSipDialog.h        |    6 ++----
 core/SipCtrlInterface.cpp |    7 +++----
 core/SipCtrlInterface.h   |    2 +-
 4 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp
index e486c07..1b90b4e 100644
--- a/core/AmSipDialog.cpp
+++ b/core/AmSipDialog.cpp
@@ -68,7 +68,7 @@ AmSipDialog::AmSipDialog(AmSipDialogEventHandler* h)
     force_outbound_proxy(AmConfig::ForceOutboundProxy),
     next_hop_port(AmConfig::NextHopPort),
     next_hop_ip(AmConfig::NextHopIP),
-    outbound_interface(-1), out_intf_for_replies(false)
+    outbound_interface(-1)
 {
   assert(h);
 }
@@ -720,8 +720,7 @@ int AmSipDialog::reply(const AmSipTransaction& t,
     return -1;
   }
 
-  int ret = SipCtrlInterface::send(reply, out_intf_for_replies ? 
-                                  outbound_interface : -1 );
+  int ret = SipCtrlInterface::send(reply);
 
   if(ret){
     ERROR("Could not send reply: code=%i; reason='%s'; method=%s; call-id=%s; 
cseq=%i\n",
@@ -746,8 +745,7 @@ int AmSipDialog::reply(const AmSipTransaction& t,
 
 /* static */
 int AmSipDialog::reply_error(const AmSipRequest& req, unsigned int code, 
-                            const string& reason, const string& hdrs,
-                            int outbound_interface)
+                            const string& reason, const string& hdrs)
 {
   AmSipReply reply;
 
@@ -760,7 +758,7 @@ int AmSipDialog::reply_error(const AmSipRequest& req, 
unsigned int code,
   if (AmConfig::Signature.length())
     reply.hdrs += SIP_HDR_COLSP(SIP_HDR_SERVER) + AmConfig::Signature + CRLF;
 
-  int ret = SipCtrlInterface::send(reply, outbound_interface);
+  int ret = SipCtrlInterface::send(reply);
   if(ret){
     ERROR("Could not send reply: code=%i; reason='%s'; method=%s; call-id=%s; 
cseq=%i\n",
          
reply.code,reply.reason.c_str(),req.method.c_str(),req.callid.c_str(),req.cseq);
diff --git a/core/AmSipDialog.h b/core/AmSipDialog.h
index 7d832ce..4d442da 100644
--- a/core/AmSipDialog.h
+++ b/core/AmSipDialog.h
@@ -147,8 +147,7 @@ private:
   string next_hop_ip;
   unsigned short next_hop_port;
 
-  int  outbound_interface;
-  bool out_intf_for_replies;
+  int outbound_interface;
 
   unsigned int cseq; // Local CSeq for next request
   bool r_cseq_i;
@@ -296,8 +295,7 @@ private:
   static int reply_error(const AmSipRequest& req,
                         unsigned int  code,
                         const string& reason,
-                        const string& hdrs = "",
-                        int outbound_interface = -1);
+                        const string& hdrs = "");
 };
 
 /**
diff --git a/core/SipCtrlInterface.cpp b/core/SipCtrlInterface.cpp
index 94ee463..06ecaab 100644
--- a/core/SipCtrlInterface.cpp
+++ b/core/SipCtrlInterface.cpp
@@ -307,8 +307,7 @@ void SipCtrlInterface::cleanup()
     }
 }
 
-int SipCtrlInterface::send(const AmSipReply &rep,
-                          int out_interface)
+int SipCtrlInterface::send(const AmSipReply &rep)
 {
     sip_msg msg;
 
@@ -363,8 +362,8 @@ int SipCtrlInterface::send(const AmSipReply &rep,
        trans_layer::instance()->send_reply((trans_ticket*)&rep.tt,
                                            rep.code,stl2cstr(rep.reason),
                                            stl2cstr(rep.to_tag),
-                                           cstring(hdrs_buf,hdrs_len), 
stl2cstr(rep.body),
-                                           out_interface);
+                                           cstring(hdrs_buf,hdrs_len), 
+                                           stl2cstr(rep.body));
 
     delete [] hdrs_buf;
 
diff --git a/core/SipCtrlInterface.h b/core/SipCtrlInterface.h
index 7f6194a..d9b48b5 100644
--- a/core/SipCtrlInterface.h
+++ b/core/SipCtrlInterface.h
@@ -100,7 +100,7 @@ public:
      * @param rep The reply to be sent. 'rep.tt' should be set to transaction 
      *            ticket included in the SIP request.
      */
-    static int send(const AmSipReply &rep, int outbound_interface = -1);
+    static int send(const AmSipReply &rep);
 
     /**
      * CANCELs an INVITE transaction.

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to