trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1197187 - in /trafficserver/traffic/trunk: CHANGES proxy/PluginVC.cc proxy/PluginVC.h
Date Thu, 03 Nov 2011 15:34:20 GMT
Author: amc
Date: Thu Nov  3 15:34:20 2011
New Revision: 1197187

URL: http://svn.apache.org/viewvc?rev=1197187&view=rev
Log:
TS-982: Fixed PluginVC set active/passive addr.

Modified:
    trafficserver/traffic/trunk/CHANGES
    trafficserver/traffic/trunk/proxy/PluginVC.cc
    trafficserver/traffic/trunk/proxy/PluginVC.h

Modified: trafficserver/traffic/trunk/CHANGES
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/CHANGES?rev=1197187&r1=1197186&r2=1197187&view=diff
==============================================================================
--- trafficserver/traffic/trunk/CHANGES (original)
+++ trafficserver/traffic/trunk/CHANGES Thu Nov  3 15:34:20 2011
@@ -1,5 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.1.1
+
+  *) TS-982 Fixed PluginVC set active/passive address. Clarified that
+   it expects host order input.
+
   *) [TS-1012] Eliminate proxy.config.http.append_xforwards_header, which
    is never used.
  

Modified: trafficserver/traffic/trunk/proxy/PluginVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/PluginVC.cc?rev=1197187&r1=1197186&r2=1197187&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/PluginVC.cc (original)
+++ trafficserver/traffic/trunk/proxy/PluginVC.cc Thu Nov  3 15:34:20 2011
@@ -1145,17 +1145,15 @@ PluginVCCore::kill_no_connect()
 }
 
 void
-PluginVCCore::set_passive_addr(uint32_t ip, int port)
+PluginVCCore::set_passive_addr(in_addr_t ip, int port)
 {
-  ((struct sockaddr_in *)&(passive_addr_struct))->sin_addr.s_addr = htonl(ip);
-  ((struct sockaddr_in *)&(passive_addr_struct))->sin_port = htons(port);
+  ink_inet_ip4_set(&passive_addr_struct, htonl(ip), htons(port));
 }
 
 void
-PluginVCCore::set_active_addr(uint32_t ip, int port)
+PluginVCCore::set_active_addr(in_addr_t ip, int port)
 {
-  ((struct sockaddr_in *)&(active_addr_struct))->sin_addr.s_addr = htonl(ip);
-  ((struct sockaddr_in *)&(active_addr_struct))->sin_port = htons(port);
+  ink_inet_ip4_set(&active_addr_struct, htonl(ip), htons(port));
 }
 
 void

Modified: trafficserver/traffic/trunk/proxy/PluginVC.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/PluginVC.h?rev=1197187&r1=1197186&r2=1197187&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/PluginVC.h (original)
+++ trafficserver/traffic/trunk/proxy/PluginVC.h Thu Nov  3 15:34:20 2011
@@ -177,8 +177,16 @@ public:
   Action *connect_re(Continuation * c);
   void kill_no_connect();
 
-  void set_active_addr(uint32_t ip, int port);
-  void set_passive_addr(uint32_t ip, int port);
+  /// Set the active address.
+  void set_active_addr(
+    in_addr_t ip, ///< IPv4 address in host order.
+    int port ///< IP Port in host order.
+  );
+  /// Set the passive address.
+  void set_passive_addr(
+    in_addr_t ip, ///< IPv4 address in host order.
+    int port ///< IP port in host order.
+  );
 
   void set_active_data(void *data);
   void set_passive_data(void *data);



Mime
View raw message