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

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Sat Feb  4 15:31:50 2012 +0100

core/sbc: removed next_hop_for_replies.

---

 apps/sbc/SBC.cpp     |    6 ------
 core/AmConfig.cpp    |    5 -----
 core/AmConfig.h      |    2 --
 core/AmSipDialog.cpp |   12 +++---------
 core/AmSipDialog.h   |    3 ---
 5 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/apps/sbc/SBC.cpp b/apps/sbc/SBC.cpp
index 1f45c61..a326005 100644
--- a/apps/sbc/SBC.cpp
+++ b/apps/sbc/SBC.cpp
@@ -1525,12 +1525,6 @@ void SBCDialog::createCalleeSession()
     callee_dlg.next_hop_ip = call_profile.next_hop_ip;
     callee_dlg.next_hop_port = call_profile.next_hop_port.empty() ?
       5060 : call_profile.next_hop_port_i;
-
-    if (!call_profile.next_hop_for_replies.empty()) {
-      callee_dlg.next_hop_for_replies =
-       (call_profile.next_hop_for_replies == "yes" ||
-        call_profile.next_hop_for_replies == "1");
-    }
   }
 
   if(outbound_interface >= 0)
diff --git a/core/AmConfig.cpp b/core/AmConfig.cpp
index 19bc4f3..2a9c57e 100644
--- a/core/AmConfig.cpp
+++ b/core/AmConfig.cpp
@@ -80,7 +80,6 @@ string       AmConfig::OutboundProxy           = "";
 bool         AmConfig::ForceOutboundProxy      = false;
 string       AmConfig::NextHopIP               = "";
 unsigned int AmConfig::NextHopPort             = 0;
-bool         AmConfig::NextHopForReplies       = false;
 bool         AmConfig::ProxyStickyAuth         = false;
 bool         AmConfig::DisableDNSSRV           = false;
 string       AmConfig::Signature               = "";
@@ -312,10 +311,6 @@ int AmConfig::readConfiguration()
     NextHopPort = cfg.getParameterInt("next_hop_port", 0);
   }
 
-  if(cfg.hasParameter("next_hop_for_replies")) {
-    NextHopForReplies = (cfg.getParameter("next_hop_for_replies") == "yes");
-  }
-
   if(cfg.hasParameter("proxy_sticky_auth")) {
     ProxyStickyAuth = (cfg.getParameter("proxy_sticky_auth") == "yes");
   }
diff --git a/core/AmConfig.h b/core/AmConfig.h
index 009ec3e..1b5edd7 100644
--- a/core/AmConfig.h
+++ b/core/AmConfig.h
@@ -144,8 +144,6 @@ struct AmConfig
   static string NextHopIP;
   /** force next hop port */
   static unsigned int NextHopPort;
-  /** force next hop for replies, too */
-  static bool NextHopForReplies;
   /** update ruri-host to previously resolved IP:port on SIP auth */
   static bool ProxyStickyAuth;
   /** skip DNS SRV lookup for resolving destination address*/
diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp
index 4cea444..e486c07 100644
--- a/core/AmSipDialog.cpp
+++ b/core/AmSipDialog.cpp
@@ -68,7 +68,6 @@ AmSipDialog::AmSipDialog(AmSipDialogEventHandler* h)
     force_outbound_proxy(AmConfig::ForceOutboundProxy),
     next_hop_port(AmConfig::NextHopPort),
     next_hop_ip(AmConfig::NextHopIP),
-    next_hop_for_replies(AmConfig::NextHopForReplies),
     outbound_interface(-1), out_intf_for_replies(false)
 {
   assert(h);
@@ -120,9 +119,7 @@ void AmSipDialog::onRxRequest(const AmSipRequest& req)
 
       INFO("remote cseq lower than previous ones - refusing request\n");
       // see 12.2.2
-      reply_error(req, 500, SIP_REPLY_SERVER_INTERNAL_ERROR, hdrs,
-                 next_hop_for_replies ? next_hop_ip : "",
-                 next_hop_for_replies ? next_hop_port : 0);
+      reply_error(req, 500, SIP_REPLY_SERVER_INTERNAL_ERROR, hdrs);
       return;
     }
 
@@ -133,9 +130,8 @@ void AmSipDialog::onRxRequest(const AmSipRequest& req)
           (oa.getState() != AmOfferAnswer::OA_Completed))) {
 
        reply_error(req, 491, SIP_REPLY_PENDING,
-                   SIP_HDR_COLSP(SIP_HDR_RETRY_AFTER) + int2str(get_random() % 
10) + CRLF,
-                   next_hop_for_replies ? next_hop_ip : "",
-                   next_hop_for_replies ? next_hop_port : 0);
+                   SIP_HDR_COLSP(SIP_HDR_RETRY_AFTER) 
+                   + int2str(get_random() % 10) + CRLF);
        return;
       }
       pending_invites++;
@@ -751,8 +747,6 @@ int AmSipDialog::reply(const AmSipTransaction& t,
 /* static */
 int AmSipDialog::reply_error(const AmSipRequest& req, unsigned int code, 
                             const string& reason, const string& hdrs,
-                            const string& next_hop_ip,
-                            unsigned short next_hop_port,
                             int outbound_interface)
 {
   AmSipReply reply;
diff --git a/core/AmSipDialog.h b/core/AmSipDialog.h
index 010eb76..7d832ce 100644
--- a/core/AmSipDialog.h
+++ b/core/AmSipDialog.h
@@ -146,7 +146,6 @@ private:
 
   string next_hop_ip;
   unsigned short next_hop_port;
-  bool next_hop_for_replies;
 
   int  outbound_interface;
   bool out_intf_for_replies;
@@ -298,8 +297,6 @@ private:
                         unsigned int  code,
                         const string& reason,
                         const string& hdrs = "",
-                        const string& next_hop_ip = "",
-                        unsigned short next_hop_port = 5060,
                         int outbound_interface = -1);
 };
 

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

Reply via email to