trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geor...@apache.org
Subject svn commit: r918279 [2/2] - in /incubator/trafficserver/traffic/trunk: ./ iocore/cache/ iocore/cluster/ iocore/dns/ iocore/eventsystem/ iocore/hostdb/ iocore/net/ iocore/utils/ libinktomi++/ librecords/ proxy/ proxy/congest/ proxy/hdrs/ proxy/http2/ pr...
Date Wed, 03 Mar 2010 00:11:10 GMT
Modified: incubator/trafficserver/traffic/trunk/proxy/InkAPIInternal.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/InkAPIInternal.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/InkAPIInternal.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/InkAPIInternal.h Wed Mar  3 00:11:08 2010
@@ -123,7 +123,7 @@
   INKContInternal * m_cont;
   int invoke(int event, void *edata);
   APIHook *next() const;
-    Link<APIHook> m_link;
+  LINK(APIHook, m_link);
 };
 
 
@@ -135,7 +135,7 @@
   APIHook *get();
 
 private:
-    Queue<APIHook> m_hooks;
+  Que(APIHook, m_link) m_hooks;
 };
 
 
@@ -155,7 +155,7 @@
   int hooks_set;
 
 private:
-    APIHooks m_hooks[INK_HTTP_LAST_HOOK];
+  APIHooks m_hooks[INK_HTTP_LAST_HOOK];
 };
 
 

Modified: incubator/trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc Wed Mar  3 00:11:08 2010
@@ -29,8 +29,13 @@
 
 #include "inktomi++.h"
 #include "api/include/InkAPIPrivateIOCore.h"
+#if (HOST_OS == solaris) && !defined(__GNUC__)
+#include "P_EventSystem.h" // I_EventSystem.h
+#include "P_Net.h"         // I_Net.h
+#else
 #include "I_EventSystem.h"
 #include "I_Net.h"
+#endif
 #include "I_Cache.h"
 #include "I_HostDB.h"
 

Modified: incubator/trafficserver/traffic/trunk/proxy/InkXml.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/InkXml.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/InkXml.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/InkXml.h Wed Mar  3 00:11:08 2010
@@ -62,7 +62,7 @@
   char *m_value;
 
 public:
-  Link<InkXmlAttr> link;
+  LINK(InkXmlAttr, link);
 
 private:
   // -- member functions that are not allowed --
@@ -108,7 +108,7 @@
   Queue<InkXmlAttr> m_tags;
 
 public:
-  Link<InkXmlObject> link;
+  LINK(InkXmlObject, link);
 
 private:
   InkXmlObject * get_next_xml_object(int fd);
@@ -179,9 +179,9 @@
   struct ListElem
   {
     char *m_name;
-      Link<ListElem> link;
+    LINK(ListElem, link);
 
-      ListElem(char *name):m_name(name)
+    ListElem(char *name):m_name(name)
     {
     }
   };

Modified: incubator/trafficserver/traffic/trunk/proxy/Main.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/Main.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/Main.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/Main.cc Wed Mar  3 00:11:08 2010
@@ -1651,7 +1651,11 @@
     ink_fatal_die("sysconf() failed for _SC_GETPW_R_SIZE_MAX");
   }
 
+#if defined(__GNUC__)
   char buf[buflen];
+#else
+  char *buf = (char *)xmalloc(buflen);
+#endif
 
   // read the entry from the passwd file
   getpwnam_r(user, &pwbuf, buf, buflen, &pwbufp);
@@ -1672,6 +1676,9 @@
       ink_fatal_die("Can't change uid to user: %s, uid: %d", user, pwbuf.pw_uid);
     }
   }
+#if !defined(__GNUC__)
+  xfree(buf);
+#endif
 }
 
 

Modified: incubator/trafficserver/traffic/trunk/proxy/Plugin.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/Plugin.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/Plugin.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/Plugin.h Wed Mar  3 00:11:08 2010
@@ -50,7 +50,7 @@
   char *vendor_name;
   char *support_email;
 
-    Link<PluginRegInfo> link;
+  LINK(PluginRegInfo, link);
 };
 
 // Plugin registration vars

Modified: incubator/trafficserver/traffic/trunk/proxy/Update.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/Update.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/Update.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/Update.h Wed Mar  3 00:11:08 2010
@@ -149,7 +149,7 @@
   int ScheduleNow(time_t);
 
 public:
-    Link<UpdateEntry> link;
+  LINK(UpdateEntry, link);
   UpdateEntry *_group_link;
   UpdateEntry *_hash_link;
 

Modified: incubator/trafficserver/traffic/trunk/proxy/congest/Congestion.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/congest/Congestion.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/congest/Congestion.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/congest/Congestion.cc Wed Mar  3 00:11:08
2010
@@ -27,12 +27,8 @@
  *
  *
  ****************************************************************************/
-#include "Main.h"
-#include "Error.h"
-#include "ProxyConfig.h"
-//#include "Lock.h"
-#include "P_Net.h"
-//#include "Freer.h"
+#include "inktomi++.h"
+#include "I_Net.h"
 #include "CongestionDB.h"
 #include "Congestion.h"
 #include "ControlMatcher.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.h Wed Mar  3 00:11:08
2010
@@ -88,7 +88,7 @@
   Op_t m_op;
   CongestionEntry *m_pEntry;
 
-  Link<CongestRequestParam> link;
+  LINK(CongestRequestParam, link);
 };
 
 /* struct declaration and definitions */

Modified: incubator/trafficserver/traffic/trunk/proxy/congest/MT_hashtable.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/congest/MT_hashtable.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/congest/MT_hashtable.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/congest/MT_hashtable.h Wed Mar  3 00:11:08
2010
@@ -75,9 +75,9 @@
   HashTableEntry<key_t, data_t> **ppcur;
 };
 
-template<class key_t, class data_t> class HashTable {
+template<class key_t, class data_t> class IMTHashTable {
 public:
-  HashTable(int size, bool(*gc_func) (data_t) = NULL, void (*pre_gc_func) (void) = NULL)
{
+  IMTHashTable(int size, bool(*gc_func) (data_t) = NULL, void (*pre_gc_func) (void) = NULL)
{
     m_gc_func = gc_func;
     m_pre_gc_func = pre_gc_func;
     bucket_num = size;
@@ -85,7 +85,7 @@
     buckets = new HashTableEntry<key_t, data_t> *[bucket_num];
     memset(buckets, 0, bucket_num * sizeof(HashTableEntry<key_t, data_t> *));
   }
-  ~HashTable() {
+  ~IMTHashTable() {
     reset();
   }
 
@@ -190,15 +190,15 @@
   void (*m_pre_gc_func) (void);
 
 private:
-  HashTable();
-  HashTable(HashTable &);
+  IMTHashTable();
+  IMTHashTable(IMTHashTable &);
 };
 
 /* 
  * we can use ClassAllocator here if the malloc performance becomes a problem 
  */
 
-template<class key_t, class data_t> inline data_t HashTable<key_t, data_t>::insert_entry(key_t
key, data_t data)
+template<class key_t, class data_t> inline data_t IMTHashTable<key_t, data_t>::insert_entry(key_t
key, data_t data)
 {
   int id = bucket_id(key);
   HashTableEntry<key_t, data_t> *cur = buckets[id];
@@ -231,7 +231,7 @@
 }
 
 
-template<class key_t, class data_t> inline data_t HashTable<key_t, data_t>::remove_entry(key_t
key)
+template<class key_t, class data_t> inline data_t IMTHashTable<key_t, data_t>::remove_entry(key_t
key)
 {
   int id = bucket_id(key);
   data_t ret = (data_t) 0;
@@ -254,7 +254,7 @@
   return ret;
 }
 
-template<class key_t, class data_t> inline data_t HashTable<key_t, data_t>::lookup_entry(key_t
key)
+template<class key_t, class data_t> inline data_t IMTHashTable<key_t, data_t>::lookup_entry(key_t
key)
 {
   int id = bucket_id(key);
   data_t ret = (data_t) 0;
@@ -270,7 +270,7 @@
 
 
 template<class key_t, class data_t>
-  inline data_t HashTable<key_t, data_t>::first_entry(int bucket_id, HashTableIteratorState<key_t,
data_t> *s)
+  inline data_t IMTHashTable<key_t, data_t>::first_entry(int bucket_id, HashTableIteratorState<key_t,
data_t> *s)
 {
   s->cur_buck = bucket_id;
   s->ppcur = &(buckets[bucket_id]);
@@ -280,7 +280,7 @@
 }
 
 template<class key_t, class data_t>
-  inline data_t HashTable<key_t, data_t>::next_entry(HashTableIteratorState<key_t,
data_t> *s)
+  inline data_t IMTHashTable<key_t, data_t>::next_entry(HashTableIteratorState<key_t,
data_t> *s)
 {
   if ((*(s->ppcur)) != NULL) {
     s->ppcur = &((*(s->ppcur))->next);
@@ -291,7 +291,7 @@
 }
 
 template<class key_t, class data_t>
-  inline data_t HashTable<key_t, data_t>::cur_entry(HashTableIteratorState<key_t,
data_t> *s)
+  inline data_t IMTHashTable<key_t, data_t>::cur_entry(HashTableIteratorState<key_t,
data_t> *s)
 {
   if (*(s->ppcur) == NULL)
     return (data_t) 0;
@@ -299,7 +299,7 @@
 }
 
 template<class key_t, class data_t>
-  inline data_t HashTable<key_t, data_t>::remove_entry(HashTableIteratorState<key_t,
data_t> *s)
+  inline data_t IMTHashTable<key_t, data_t>::remove_entry(HashTableIteratorState<key_t,
data_t> *s)
 {
   data_t data = (data_t) 0;
   HashTableEntry<key_t, data_t> *pEntry = *(s->ppcur);
@@ -317,7 +317,7 @@
   MTHashTable(int size, bool(*gc_func) (data_t) = NULL, void (*pre_gc_func) (void) = NULL)
{
     for (int i = 0; i < MT_HASHTABLE_PARTITIONS; i++) {
       locks[i] = new_ProxyMutex();
-      hashTables[i] = new HashTable<key_t, data_t> (size, gc_func, pre_gc_func);
+      hashTables[i] = new IMTHashTable<key_t, data_t> (size, gc_func, pre_gc_func);
       // INIT_CHAIN_HEAD(&chain_heads[i]);
       // last_GC_time[i] = 0;
     }
@@ -370,14 +370,14 @@
 
   data_t cur_entry(int part_id, HashTableIteratorState<key_t, data_t> *s)
   {
-    data_t data = HashTable<key_t, data_t>::cur_entry(s);
+    data_t data = IMTHashTable<key_t, data_t>::cur_entry(s);
     if (!data)
       data = next_entry(part_id, s);
     return data;
   };
   data_t next_entry(int part_id, HashTableIteratorState<key_t, data_t> *s)
   {
-    data_t ret = HashTable<key_t, data_t>::next_entry(s);
+    data_t ret = IMTHashTable<key_t, data_t>::next_entry(s);
     if (ret != (data_t) 0)
       return ret;
     for (int i = s->cur_buck + 1; i < hashTables[part_id]->getBucketNum(); i++)
{
@@ -394,7 +394,7 @@
   }
 
 private:
-  HashTable<key_t, data_t> *hashTables[MT_HASHTABLE_PARTITIONS];
+  IMTHashTable<key_t, data_t> *hashTables[MT_HASHTABLE_PARTITIONS];
   ProxyMutexPtr locks[MT_HASHTABLE_PARTITIONS];
   // MT_ListEntry chain_heads[MT_HASHTABLE_PARTITIONS];
   // int last_GC_time[MT_HASHTABLE_PARTITIONS];

Modified: incubator/trafficserver/traffic/trunk/proxy/hdrs/SDKAllocator.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/hdrs/SDKAllocator.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/hdrs/SDKAllocator.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/hdrs/SDKAllocator.h Wed Mar  3 00:11:08 2010
@@ -55,7 +55,7 @@
 {
   inku32 m_magic;
   SDKAllocator *m_source;
-    Link<SDKAllocHdr> link;
+  LINK(SDKAllocHdr, link);
 };
 
 class SDKAllocator:public DLL<SDKAllocHdr>

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpConnectionCount.h Wed Mar  3 00:11:08
2010
@@ -25,16 +25,21 @@
 
 #ifndef _HTTP_CONNECTION_COUNT_H_
 
+#if (__GNUC__ >= 3)
 #define _BACKWARD_BACKWARD_WARNING_H    // needed for gcc 4.3
 #include <ext/hash_map>
 #undef _BACKWARD_BACKWARD_WARNING_H
+#else
+#include <hash_map>
+#endif
 // XXX - had to include map to get around "max" begin defined as a macro
 // in the traffic server code, really odd
 #include <map>
 #include <ink_mutex.h>
 
-
+#if (__GNUC__ >= 3)
 using namespace __gnu_cxx;
+#endif
 using namespace std;
 
 

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpPages.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpPages.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpPages.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpPages.h Wed Mar  3 00:11:08 2010
@@ -40,6 +40,7 @@
 #include "DynArray.h"
 #include "HTTP.h"
 #include "StatPages.h"
+#include "HttpSM.h"
 
 class HttpSM;
 
@@ -49,7 +50,7 @@
 struct HttpSMListBucket
 {
   Ptr<ProxyMutex> mutex;
-  DLL<HttpSM> sm_list;
+  DList(HttpSM, debug_link) sm_list;
 };
 
 extern HttpSMListBucket HttpSMList[];
@@ -67,7 +68,7 @@
 
 private:
 
-    ink64 extract_id(const char *query);
+  ink64 extract_id(const char *query);
   void dump_hdr(HTTPHdr * hdr, char *desc);
   void dump_tunnel_info(HttpSM * sm);
   void dump_history(HttpSM * sm);

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc Wed Mar  3 00:11:08 2010
@@ -50,6 +50,9 @@
 //#include "HttpAuthParams.h"
 #include "congest/Congestion.h"
 
+#if (HOST_OS == solaris) && !defined(__GNUC__)
+#include <string>
+#endif
 
 #define DEFAULT_RESPONSE_BUFFER_SIZE_INDEX    6 // 8K
 #define DEFAULT_REQUEST_BUFFER_SIZE_INDEX    6  // 8K
@@ -556,7 +559,7 @@
       return EVENT_DONE;
     }
 
-    HttpSMList[bucket].sm_list.push(this, this->debug_link);
+    HttpSMList[bucket].sm_list.push(this);
   }
 
   t_state.api_next_action = HttpTransact::HTTP_API_SM_START;
@@ -586,7 +589,7 @@
       return EVENT_DONE;
     }
 
-    HttpSMList[bucket].sm_list.remove(this, this->debug_link);
+    HttpSMList[bucket].sm_list.remove(this);
   }
 
   return this->kill_this_async_hook(EVENT_NONE, NULL);
@@ -7836,10 +7839,17 @@
 
     if (host != NULL) {
       int port = clientUrl.port_get();
+#if defined(__GNUC__)
       char buf[host_len + 7];
+#else
+      char *buf = (char *)xmalloc(host_len + 7);
+#endif
       strncpy(buf, host, host_len);
       host_len += snprintf(buf + host_len, sizeof(buf) - host_len, ":%d", port);
       t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, buf, host_len);
+#if !defined(__GNUC__)
+      xfree(buf);
+#endif
     } else {
       // the client request didn't have a host, so remove it from the headers
       t_state.hdr_info.client_request.field_delete(MIME_FIELD_HOST, MIME_LEN_HOST);

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.h Wed Mar  3 00:11:08 2010
@@ -193,12 +193,12 @@
   friend class HttpPagesHandler;
   friend class CoreUtils;
 public:
-    HttpSM();
+  HttpSM();
   void cleanup();
   virtual void destroy();
 
   static HttpSM *allocate();
-    HttpCacheSM & get_cache_sm();       //Added to get the object of CacheSM YTS Team,
yamsat
+  HttpCacheSM & get_cache_sm();       //Added to get the object of CacheSM YTS Team,
yamsat
   HttpVCTableEntry *get_ua_entry();     //Added to get the ua_entry pointer  - YTS-TEAM
   static void _instantiate_func(HttpSM * prototype, HttpSM * new_instance);
   static void _make_scatter_list(HttpSM * prototype);
@@ -528,7 +528,7 @@
   void transform_cleanup(INKHttpHookID hook, HttpTransformInfo * info);
 
 public:
-  Link<HttpSM> debug_link;
+  LINK(HttpSM, debug_link);
 };
 
 //Function to get the cache_sm object - YTS Team, yamsat

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpServerSession.h Wed Mar  3 00:11:08
2010
@@ -128,8 +128,8 @@
   bool private_session;
   //bool www_auth_content;
 
-  Link<HttpServerSession> lru_link;
-  Link<HttpServerSession> hash_link;
+  LINK(HttpServerSession, lru_link);
+  LINK(HttpServerSession, hash_link);
 
   // Keep track of connection limiting and a pointer to the
   // singleton that keeps track of the connection counts.

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.cc Wed Mar  3 00:11:08
2010
@@ -111,8 +111,8 @@
       Debug("http_ss", "[%lld] [session_bucket] session received "
             "io notice [%s]", s->con_id, HttpDebugNames::get_event_name(event));
       ink_assert(s->state == HSS_KA_SHARED);
-      lru_list.remove(s, s->lru_link);
-      l2_hash[l2_index].remove(s, s->hash_link);
+      lru_list.remove(s);
+      l2_hash[l2_index].remove(s);
       s->do_io_close();
       return 0;
     } else {
@@ -154,9 +154,9 @@
     if (lock) {
       while (b->lru_list.head) {
         HttpServerSession *sess = b->lru_list.head;
-        b->lru_list.remove(sess, sess->lru_link);
+        b->lru_list.remove(sess);
         int l2_index = SECOND_LEVEL_HASH(sess->server_ip);
-        b->l2_hash[l2_index].remove(sess, sess->hash_link);
+        b->l2_hash[l2_index].remove(sess);
         sess->do_io_close();
       }
     } else {
@@ -249,8 +249,8 @@
           //  we can not get called back from the netProcessor 
           //  here.  The SM will do a do_io when it gets the session,
           //  effectively canceling the keep-alive read
-          bucket->lru_list.remove(b, b->lru_link);
-          bucket->l2_hash[l2_index].remove(b, b->hash_link);
+          bucket->lru_list.remove(b);
+          bucket->l2_hash[l2_index].remove(b);
           b->state = HSS_ACTIVE;
           to_return = b;
           Debug("http_ss", "[%lld] [acquire session] " "return session from shared pool",
to_return->con_id);
@@ -297,8 +297,8 @@
     ink_assert(l2_index < HSM_LEVEL2_BUCKETS);
 
     // First insert the session on to our lists
-    bucket->lru_list.enqueue(to_release, to_release->lru_link);
-    bucket->l2_hash[l2_index].push(to_release, to_release->hash_link);
+    bucket->lru_list.enqueue(to_release);
+    bucket->l2_hash[l2_index].push(to_release);
     to_release->state = HSS_KA_SHARED;
 
     // Now we need to issue a read on the connection to detect

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpSessionManager.h Wed Mar  3 00:11:08
2010
@@ -54,8 +54,8 @@
 public:
   SessionBucket();
   int session_handler(int event, void *data);
-    Queue<HttpServerSession> lru_list;
-    DLL<HttpServerSession> l2_hash[HSM_LEVEL2_BUCKETS];
+  Que(HttpServerSession, lru_link) lru_list;
+  DList(HttpServerSession, hash_link) l2_hash[HSM_LEVEL2_BUCKETS];
 };
 
 enum HSMresult_t

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc Wed Mar  3 00:11:08
2010
@@ -8547,7 +8547,7 @@
 int
 HttpTransact::calculate_freshness_fuzz(State * s, int fresh_limit)
 {
-  static double LOG_YEAR = log10(NUM_SECONDS_IN_ONE_YEAR);
+  static double LOG_YEAR = log10((double)NUM_SECONDS_IN_ONE_YEAR);
   const inku32 granularity = 1000;
   int result = 0;
 
@@ -8560,10 +8560,10 @@
       // Complicated calculations to try to find a reasonable fuzz time between fuzz_min_time
and fuzz_time
       int fresh_small = (int) rint((double) s->http_config_param->freshness_fuzz_min_time
*
                                    pow(2, min((double) fresh_limit / (double) s->http_config_param->freshness_fuzz_time,
-                                              sqrt(s->http_config_param->freshness_fuzz_time))));
+                                              sqrt((double)s->http_config_param->freshness_fuzz_time))));
       int fresh_large = max((int) s->http_config_param->freshness_fuzz_min_time,
                             (int) rint(s->http_config_param->freshness_fuzz_time *
-                                       log10(fresh_limit - s->http_config_param->freshness_fuzz_min_time)
/ LOG_YEAR));
+                                       log10((double)(fresh_limit - s->http_config_param->freshness_fuzz_min_time)
/ LOG_YEAR)));
       result = min(fresh_small, fresh_large);
       Debug("http_match", "calculate_freshness_fuzz using min/max --- freshness fuzz = %d",
result);
     } else {

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpTunnel.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpTunnel.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpTunnel.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpTunnel.h Wed Mar  3 00:11:08 2010
@@ -56,6 +56,7 @@
 #define ALLOCATE_AND_WRITE_TO_BUF 1
 #define WRITE_TO_BUF 2
 
+class HttpTunnelProducer;
 class HttpSM;
 class HttpPagesHandler;
 typedef int (HttpSM::*HttpSMHandler) (int event, void *data);
@@ -136,6 +137,29 @@
   int transfer_bytes();
 };
 
+struct HttpTunnelConsumer
+{
+  HttpTunnelConsumer();
+
+  LINK(HttpTunnelConsumer, link);
+  HttpTunnelProducer *producer;
+  HttpTunnelProducer *self_producer;
+
+  HttpTunnelType_t vc_type;
+  VConnection *vc;
+  IOBufferReader *buffer_reader;
+  HttpConsumerHandler vc_handler;
+  VIO *write_vio;
+
+  int skip_bytes;               // bytes to skip at beginning of stream
+  int bytes_written;            // total bytes written to the vc
+  int handler_state;            // state used the handlers
+
+  bool alive;
+  bool write_success;
+  const char *name;
+};
+
 struct HttpTunnelProducer
 {
   HttpTunnelProducer();
@@ -169,29 +193,6 @@
   const char *name;
 };
 
-struct HttpTunnelConsumer
-{
-  HttpTunnelConsumer();
-
-  Link<HttpTunnelConsumer> link;
-  HttpTunnelProducer *producer;
-  HttpTunnelProducer *self_producer;
-
-  HttpTunnelType_t vc_type;
-  VConnection *vc;
-  IOBufferReader *buffer_reader;
-  HttpConsumerHandler vc_handler;
-  VIO *write_vio;
-
-  int skip_bytes;               // bytes to skip at beginning of stream
-  int bytes_written;            // total bytes written to the vc
-  int handler_state;            // state used the handlers
-
-  bool alive;
-  bool write_success;
-  const char *name;
-};
-
 class PostDataBuffers
 {
 public:

Modified: incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.h Wed Mar  3 00:11:08 2010
@@ -281,10 +281,10 @@
     char *filename;
     int is_ascii;
     char *header;
-      Link<PreDefinedFormatInfo> link;
+    LINK(PreDefinedFormatInfo, link);
 
-      PreDefinedFormatInfo(LogFormat * fmt, char *fname, int ascii,
-                           char *hdr):format(fmt), filename(fname), is_ascii(ascii), header(hdr)
+    PreDefinedFormatInfo(LogFormat * fmt, char *fname, int ascii,
+                         char *hdr):format(fmt), filename(fname), is_ascii(ascii), header(hdr)
     {
     };
   };

Modified: incubator/trafficserver/traffic/trunk/proxy/logging/LogField.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logging/LogField.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logging/LogField.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logging/LogField.h Wed Mar  3 00:11:08 2010
@@ -147,7 +147,7 @@
   Ptr<LogFieldAliasMap> m_alias_map; // map sINT <--> string
 
 public:
-  Link<LogField> link;
+  LINK(LogField, link);
 
 private:
 // luis, check where this is used and what it does
@@ -194,11 +194,11 @@
 
 private:
   unsigned m_marshal_len;
-    Queue<LogField> m_field_list;
+  Queue<LogField> m_field_list;
 
   // -- member functions that are not allowed --
-    LogFieldList(const LogFieldList & rhs);
-    LogFieldList & operator=(const LogFieldList & rhs);
+  LogFieldList(const LogFieldList & rhs);
+  LogFieldList & operator=(const LogFieldList & rhs);
 };
 
 #endif

Modified: incubator/trafficserver/traffic/trunk/proxy/logging/LogFile.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logging/LogFile.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logging/LogFile.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logging/LogFile.cc Wed Mar  3 00:11:08 2010
@@ -868,11 +868,19 @@
     memset(&wvec[1], 0, sizeof(iovec));
     int bytes_this_write, vcnt = 1;
 
+#if (HOST_OS == solaris)
+    wvec[0].iov_base = (caddr_t) data;
+#else
     wvec[0].iov_base = (void *) data;
+#endif
     wvec[0].iov_len = (size_t) len;
 
     if (data[len - 1] != '\n') {
+#if (HOST_OS == solaris)
+      wvec[1].iov_base = (caddr_t) "\n";
+#else
       wvec[1].iov_base = (void *) "\n";
+#endif
       wvec[1].iov_len = (size_t) 1;
       vcnt++;
     }

Modified: incubator/trafficserver/traffic/trunk/proxy/logging/LogFilter.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logging/LogFilter.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logging/LogFilter.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logging/LogFilter.h Wed Mar  3 00:11:08 2010
@@ -110,7 +110,7 @@
   size_t m_num_values;          // the number of comparison values
 
 public:
-  Link<LogFilter> link;      // so we can create a LogFilterList
+  LINK(LogFilter, link);      // so we can create a LogFilterList
 
 private:
   // -- member functions that are not allowed --

Modified: incubator/trafficserver/traffic/trunk/proxy/logging/LogFormat.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logging/LogFormat.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logging/LogFormat.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logging/LogFormat.h Wed Mar  3 00:11:08 2010
@@ -149,7 +149,7 @@
   LogFormatType m_format_type;
 
 public:
-  Link<LogFormat> link;
+  LINK(LogFormat, link);
 
 private:
   // -- member functions that are not allowed --
@@ -183,11 +183,11 @@
   unsigned count();
   void display(FILE * fd = stdout);
 private:
-    Queue<LogFormat> m_format_list;
+  Queue<LogFormat> m_format_list;
 
   // -- member functions that are not allowed --
-    LogFormatList(const LogFormatList & rhs);
-    LogFormatList & operator=(const LogFormatList & rhs);
+  LogFormatList(const LogFormatList & rhs);
+  LogFormatList & operator=(const LogFormatList & rhs);
 };
 
 #endif

Modified: incubator/trafficserver/traffic/trunk/proxy/logging/LogHost.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logging/LogHost.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logging/LogHost.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logging/LogHost.h Wed Mar  3 00:11:08 2010
@@ -115,7 +115,7 @@
 #endif
 
 public:
-  Link<LogHost> link;
+  LINK(LogHost, link);
 
 private:
   // -- member functions not allowed --

Modified: incubator/trafficserver/traffic/trunk/proxy/logstats.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logstats.cc?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logstats.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logstats.cc Wed Mar  3 00:11:08 2010
@@ -43,18 +43,25 @@
 #include <string>
 #include <algorithm>
 #include <vector>
+#if (__GNUC__ >= 3)
 #define _BACKWARD_BACKWARD_WARNING_H    // needed for gcc 4.3
 #include <ext/hash_map>
 #include <ext/hash_set>
 #undef _BACKWARD_BACKWARD_WARNING_H
+#else
+#include <hash_map>
+#include <hash_set>
+#include <map>
+#endif
 #ifndef _XOPEN_SOURCE
 #define _XOPEN_SOURCE 600
 #endif
 #include <fcntl.h>
 
-
+#if defined(__GNUC__)
 using namespace __gnu_cxx;
-
+#endif
+using namespace std;
 
 // Constants, please update the VERSION number when you make a new build!!!
 #define PROGRAM_NAME		"traffic_logstats"
@@ -1187,7 +1194,7 @@
 format_int(ink64 num, std::ostream & out)
 {
   if (num > 0) {
-    ink64 mult = (ink64) pow(10, (int) (log10(num) / 3) * 3);
+    ink64 mult = (ink64) pow((double)10, (int) (log10((double)num) / 3) * 3);
     ink64 div;
     std::stringstream ss;
 
@@ -1243,7 +1250,7 @@
 {
   static char metrics[] = "KKMGTP";
   static char buf[64];
-  int ix = (stat.bytes > 1024 ? (int) (log10(stat.bytes) / LOG10_1024) : 1);
+  int ix = (stat.bytes > 1024 ? (int) (log10((double)stat.bytes) / LOG10_1024) : 1);
 
   out << std::left << std::setw(29) << desc;
 
@@ -1253,7 +1260,7 @@
   snprintf(buf, sizeof(buf), "%10.2f%%", ((double) stat.count / total.count * 100));
   out << std::right << buf;
 
-  snprintf(buf, sizeof(buf), "%10.2f%cB", stat.bytes / pow(1024, ix), metrics[ix]);
+  snprintf(buf, sizeof(buf), "%10.2f%cB", stat.bytes / pow((double)1024, ix), metrics[ix]);
   out << std::right << buf;
 
   snprintf(buf, sizeof(buf), "%10.2f%%", ((double) stat.bytes / total.bytes * 100));

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/FileManager.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/FileManager.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/FileManager.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/FileManager.h Wed Mar  3 00:11:08 2010
@@ -47,7 +47,7 @@
 {
 public:
   FileCallbackFunc func;
-  Link<callbackListable> link;
+  LINK(callbackListable, link);
 };
 
 struct fileBinding

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am Wed Mar  3 00:11:08 2010
@@ -117,9 +117,9 @@
   utils/libutils_lm.a \
   $(top_builddir)/proxy/hdrs/libhdrs.a \
   $(top_builddir)/librecords/libreclocal.a \
-  $(top_builddir)/libinktomi++/libinktomi++.a \
   $(top_builddir)/proxy/mgmt2/tools/libinksysapi.a \
   $(top_builddir)/proxy/mgmt2/tools/libinkconfigapi.a \
+  $(top_builddir)/libinktomi++/libinktomi++.a \
   @LIBEXPAT@ \
   @LIBSSL@ @LIBDB@ @LIBSQLITE3@ @LIBREGEX@ @LIBTCL@ @LIBICONV@ \
   @LIBM@ @LIBDL@ @LIBSOCKET@ @LIBNSL@ @LIBRESOLV@ \

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/Rollback.h Wed Mar  3 00:11:08 2010
@@ -58,7 +58,7 @@
 {
   version_t version;
   time_t modTime;
-    Link<versionInfo> link;
+  LINK(versionInfo, link);
 };
 
 //

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h Wed Mar  3 00:11:08
2010
@@ -60,11 +60,10 @@
   virtual INKCfgEle *getCfgEleCopy() = 0;       /* returns copy of ele */
   virtual INKRuleTypeT getRuleType() = 0;
 
-  Link<CfgEleObj> link;
+  LINK(CfgEleObj, link);
 
 protected:
   bool m_valid;                 /* stores if Ele has valid fields; by default true */
-
 };
 
 /********************************************************************

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h Wed Mar  3 00:11:08
2010
@@ -60,7 +60,7 @@
 
   char *name;
   char *value;
-    Link<Token> link;
+  LINK(Token, link);
 };
 
 /***************************************************************************
@@ -182,7 +182,7 @@
   void Print();
   TokenList *parse(const char *buf, INKFileNameT filetype);
 
-  Link<Rule> link;
+  LINK(Rule, link);
 private:
 
   INKFileNameT m_filetype;

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.h Wed Mar  3 00:11:08
2010
@@ -130,9 +130,9 @@
   short precedence();
   void copy(const StatExprToken &);
 
-    Link<StatExprToken> link;
-    StatExprToken();
-    inline ~ StatExprToken()
+  LINK(StatExprToken, link);
+  StatExprToken();
+  inline ~ StatExprToken()
   {
     clean();
   };
@@ -172,7 +172,6 @@
 
   size_t m_size;
   Queue<StatExprToken> m_tokenList;
-
 };
 
 /***************************************************************
@@ -198,12 +197,12 @@
   StatFloat m_stats_max;
   StatFloat m_stats_min;
   bool m_has_delta;
-    Link<StatObject> link;
+  LINK(StatObject, link);
 
   // Member functions
-    StatObject();
-    StatObject(unsigned);
-    inline ~ StatObject()
+  StatObject();
+  StatObject(unsigned);
+  inline ~ StatObject()
   {
     clean();
   };
@@ -219,7 +218,6 @@
 private:
 
   void infix2postfix();
-
 };
 
 
@@ -250,7 +248,6 @@
 private:
 
   Queue<StatObject> m_statList;
-
 };
 
 #endif

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h Wed Mar  3 00:11:08
2010
@@ -78,7 +78,7 @@
   alarm_t type;
   char *ip;
   char *desc;
-    Link<AlarmListable> link;
+  LINK(AlarmListable, link);
 };
 
 enum PowerLampState
@@ -99,7 +99,7 @@
   bool localNode;
   char *hostname;               // FQ hostname of the node
   unsigned long inetAddr;       // IP address of the node
-    DLL<AlarmListable> nodeAlarms;   // List of alarms for the node
+  DLL<AlarmListable> nodeAlarms;   // List of alarms for the node
   void checkAlarms();
   bool varStrFromName(char *varName, char *bufVal, int bufLen);
   RecCounter readCounter(char *name, bool * found);
@@ -149,7 +149,7 @@
   int varClusterCounterFromName(char *, MgmtInt *);
 
 private:
-    ink_mutex accessLock;
+  ink_mutex accessLock;
 
   // Private fcns
     overviewPage(const overviewPage &);
@@ -188,11 +188,8 @@
                                         // defn found in WebOverview.cc
 
 void overviewAlarmCallback(alarm_t newAlarm, char *ip, char *desc);
-
 void resolveAlarm(InkHashTable * post_data_ht);
-
 void resolveAlarmCLI(textBuffer * output, const char *ipAddr);
-
 int hostSortFunc(const void *arg1, const void *arg2);
 
 #endif

Modified: incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h?rev=918279&r1=918278&r2=918279&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h Wed Mar  3 00:11:08 2010
@@ -40,7 +40,7 @@
 #include "ProxyConfig.h"
 #include "Stats.h"
 
-#ifdef _c_impl
+#if defined(_c_impl) && defined(__GNUC__) // TODO: review and simplify
 #define CST_INLINE
 #else
 #define CST_INLINE inline



Mime
View raw message