trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1197320 - in /trafficserver/traffic/trunk/proxy/logging: LogAccess.cc LogField.cc
Date Thu, 03 Nov 2011 21:46:02 GMT
Author: amc
Date: Thu Nov  3 21:46:02 2011
New Revision: 1197320

URL: http://svn.apache.org/viewvc?rev=1197320&view=rev
Log:
TS-989 tweaks - cleaned up type name issue, improved field length calculation.

Modified:
    trafficserver/traffic/trunk/proxy/logging/LogAccess.cc
    trafficserver/traffic/trunk/proxy/logging/LogField.cc

Modified: trafficserver/traffic/trunk/proxy/logging/LogAccess.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogAccess.cc?rev=1197320&r1=1197319&r2=1197320&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogAccess.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogAccess.cc Thu Nov  3 21:46:02 2011
@@ -796,14 +796,18 @@ LogAccess::marshal_ip(char* dest, sockad
   LogFieldIp data;
   int len = sizeof(data);
   if (ink_inet_is_ip4(ip)) {
-    LogFieldIp4* ip4 = static_cast<LogFieldIp4*>(&data);
-    ip4->_family = AF_INET;
-    ip4->_addr = ink_inet_ip4_addr_cast(ip);
+    if (dest) {
+      LogFieldIp4* ip4 = static_cast<LogFieldIp4*>(&data);
+      ip4->_family = AF_INET;
+      ip4->_addr = ink_inet_ip4_addr_cast(ip);
+    }
     len = sizeof(*ip4);
   } else if (ink_inet_is_ip6(ip)) {
-    LogFieldIp6* ip6 = static_cast<LogFieldIp6*>(&data);
-    ip6->_family = AF_INET6;
-    ip6->_addr = ink_inet_ip6_addr_cast(ip);
+    if (dest) {
+      LogFieldIp6* ip6 = static_cast<LogFieldIp6*>(&data);
+      ip6->_family = AF_INET6;
+      ip6->_addr = ink_inet_ip6_addr_cast(ip);
+    }
     len = sizeof(*ip6);
   } else {
     data._family = AF_UNSPEC;

Modified: trafficserver/traffic/trunk/proxy/logging/LogField.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogField.cc?rev=1197320&r1=1197319&r2=1197320&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogField.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogField.cc Thu Nov  3 21:46:02 2011
@@ -307,7 +307,8 @@ LogField::display(FILE *fd)
   static const char *names[LogField::N_TYPES] = {
     "sINT",
     "dINT",
-    "STR"
+    "STR",
+    "IP"
   };
 
   fprintf(fd, "    %30s %10s %5s\n", m_name, m_symbol, names[m_type]);



Mime
View raw message