Updated Branches:
  refs/heads/master 6fd9e1744 -> b9b1bdc81

Revert "TS-2082: fix build with --enable-standalone-iocore"

This reverts commit 94215bf293d76d27a88a0fc9e35356321310fbf5.

This broke some cache regression tests and we are reverting it until
those can be addressed.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b9b1bdc8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b9b1bdc8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b9b1bdc8

Branch: refs/heads/master
Commit: b9b1bdc81fa1b7e3b1edb54de938d1ea0aec2d7a
Parents: 6fd9e17
Author: Phil Sorber <[email protected]>
Authored: Fri Nov 15 09:59:43 2013 -0700
Committer: Phil Sorber <[email protected]>
Committed: Fri Nov 15 09:59:43 2013 -0700

----------------------------------------------------------------------
 CHANGES                          |  2 --
 iocore/cache/Cache.cc            | 30 ++++++++++++++-------------
 iocore/cache/CacheHttp.cc        | 16 +++++++-------
 iocore/cache/CacheRead.cc        | 10 +--------
 iocore/cache/CacheWrite.cc       |  4 ----
 iocore/cache/I_CacheDefs.h       |  2 +-
 iocore/cache/Makefile.am         |  3 ---
 iocore/cache/P_CacheInternal.h   | 11 +++++-----
 iocore/dns/DNS.cc                |  3 +--
 iocore/dns/Makefile.am           |  4 ----
 iocore/dns/P_DNSProcessor.h      | 26 -----------------------
 iocore/dns/P_SplitDNSProcessor.h | 27 ++++++++++++++++++++++++
 iocore/hostdb/HostDB.cc          |  2 +-
 iocore/hostdb/Makefile.am        |  3 ---
 iocore/hostdb/MultiCache.cc      |  1 -
 iocore/net/Makefile.am           |  4 ----
 iocore/net/Socks.cc              |  2 +-
 lib/records/RecMessage.cc        |  6 ++----
 proxy/Initialize.cc              | 39 ++++-------------------------------
 proxy/Initialize.h               |  2 +-
 proxy/shared/UglyLogStubs.cc     |  1 -
 21 files changed, 69 insertions(+), 129 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 1d39202..d6327c2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -27,8 +27,6 @@ Changes with Apache Traffic Server 4.2.0
   *) [TS-2303] Incorrect docs for negative_caching_enabled.
     Author: Thomas Jackson <[email protected]>
 
-  *) [TS-2082] fix build with --enable-standalone-iocore.
-
   *) [TS-2712] Explicitly use subdir-objects in automake init.
 
   *) [TS-2309] Allow mod_generator plugin for lighttpd to accept "SI" 
postfixes.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index da63ec4..e903a90 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -123,6 +123,20 @@ CacheKey zero_key(0, 0);
 #if TS_USE_INTERIM_CACHE == 1
 ClassAllocator<MigrateToInterimCache> 
migrateToInterimCacheAllocator("migrateToInterimCache");
 #endif
+void verify_cache_api() {
+  ink_assert((int)TS_EVENT_CACHE_OPEN_READ == (int)CACHE_EVENT_OPEN_READ);
+  ink_assert((int)TS_EVENT_CACHE_OPEN_READ_FAILED == 
(int)CACHE_EVENT_OPEN_READ_FAILED);
+  ink_assert((int)TS_EVENT_CACHE_OPEN_WRITE == (int)CACHE_EVENT_OPEN_WRITE);
+  ink_assert((int)TS_EVENT_CACHE_OPEN_WRITE_FAILED == 
(int)CACHE_EVENT_OPEN_WRITE_FAILED);
+  ink_assert((int)TS_EVENT_CACHE_REMOVE == (int)CACHE_EVENT_REMOVE);
+  ink_assert((int)TS_EVENT_CACHE_REMOVE_FAILED == 
(int)CACHE_EVENT_REMOVE_FAILED);
+  ink_assert((int)TS_EVENT_CACHE_SCAN == (int)CACHE_EVENT_SCAN);
+  ink_assert((int)TS_EVENT_CACHE_SCAN_FAILED == (int)CACHE_EVENT_SCAN_FAILED);
+  ink_assert((int)TS_EVENT_CACHE_SCAN_OBJECT == (int)CACHE_EVENT_SCAN_OBJECT);
+  ink_assert((int)TS_EVENT_CACHE_SCAN_OPERATION_BLOCKED == 
(int)CACHE_EVENT_SCAN_OPERATION_BLOCKED);
+  ink_assert((int)TS_EVENT_CACHE_SCAN_OPERATION_FAILED == 
(int)CACHE_EVENT_SCAN_OPERATION_FAILED);
+  ink_assert((int)TS_EVENT_CACHE_SCAN_DONE == (int)CACHE_EVENT_SCAN_DONE);
+}
 
 struct VolInitInfo
 {
@@ -206,6 +220,7 @@ ConfigVolumes config_volumes;
 
 #if TS_HAS_TESTS
 void force_link_CacheTestCaller() {
+  force_link_CacheTest();
 }
 #endif
 
@@ -294,14 +309,12 @@ 
CacheVC::CacheVC():alternate_index(CACHE_ALT_INDEX_DEFAULT)
   //coverity[uninit_member]
 }
 
-#ifdef HTTP_CACHE
 HTTPInfo::FragOffset*
 CacheVC::get_frag_table()
 {
   ink_assert(alternate.valid());
   return alternate.valid() ? alternate.get_frag_table() : 0;
 }
-#endif
 
 VIO *
 CacheVC::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *abuf)
@@ -581,18 +594,7 @@ int
 CacheProcessor::start_internal(int flags)
 {
 #ifdef NON_MODULAR
-  ink_assert((int)TS_EVENT_CACHE_OPEN_READ == (int)CACHE_EVENT_OPEN_READ);
-  ink_assert((int)TS_EVENT_CACHE_OPEN_READ_FAILED == 
(int)CACHE_EVENT_OPEN_READ_FAILED);
-  ink_assert((int)TS_EVENT_CACHE_OPEN_WRITE == (int)CACHE_EVENT_OPEN_WRITE);
-  ink_assert((int)TS_EVENT_CACHE_OPEN_WRITE_FAILED == 
(int)CACHE_EVENT_OPEN_WRITE_FAILED);
-  ink_assert((int)TS_EVENT_CACHE_REMOVE == (int)CACHE_EVENT_REMOVE);
-  ink_assert((int)TS_EVENT_CACHE_REMOVE_FAILED == 
(int)CACHE_EVENT_REMOVE_FAILED);
-  ink_assert((int)TS_EVENT_CACHE_SCAN == (int)CACHE_EVENT_SCAN);
-  ink_assert((int)TS_EVENT_CACHE_SCAN_FAILED == (int)CACHE_EVENT_SCAN_FAILED);
-  ink_assert((int)TS_EVENT_CACHE_SCAN_OBJECT == (int)CACHE_EVENT_SCAN_OBJECT);
-  ink_assert((int)TS_EVENT_CACHE_SCAN_OPERATION_BLOCKED == 
(int)CACHE_EVENT_SCAN_OPERATION_BLOCKED);
-  ink_assert((int)TS_EVENT_CACHE_SCAN_OPERATION_FAILED == 
(int)CACHE_EVENT_SCAN_OPERATION_FAILED);
-  ink_assert((int)TS_EVENT_CACHE_SCAN_DONE == (int)CACHE_EVENT_SCAN_DONE);
+  verify_cache_api();
 #endif
 
 #if AIO_MODE == AIO_MODE_NATIVE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/cache/CacheHttp.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheHttp.cc b/iocore/cache/CacheHttp.cc
index e07698c..36db36a 100644
--- a/iocore/cache/CacheHttp.cc
+++ b/iocore/cache/CacheHttp.cc
@@ -274,7 +274,7 @@ CacheHTTPInfoVector::~CacheHTTPInfoVector()
   -------------------------------------------------------------------------*/
 
 int
-CacheHTTPInfoVector::insert(CacheHTTPInfo */* info ATS_UNUSED */, int index)
+CacheHTTPInfoVector::insert(CacheHTTPInfo * info, int index)
 {
   ink_assert(0);
   return index;
@@ -285,7 +285,7 @@ CacheHTTPInfoVector::insert(CacheHTTPInfo */* info 
ATS_UNUSED */, int index)
 
 
 void
-CacheHTTPInfoVector::detach(int /* idx ATS_UNUSED */, CacheHTTPInfo */* r 
ATS_UNUSED */)
+CacheHTTPInfoVector::detach(int idx, CacheHTTPInfo * r)
 {
   ink_assert(0);
 }
@@ -294,7 +294,7 @@ CacheHTTPInfoVector::detach(int /* idx ATS_UNUSED */, 
CacheHTTPInfo */* r ATS_UN
   -------------------------------------------------------------------------*/
 
 void
-CacheHTTPInfoVector::remove(int /* idx ATS_UNUSED */, bool /* destroy 
ATS_UNUSED */)
+CacheHTTPInfoVector::remove(int idx, bool destroy)
 {
   ink_assert(0);
 }
@@ -303,7 +303,7 @@ CacheHTTPInfoVector::remove(int /* idx ATS_UNUSED */, bool 
/* destroy ATS_UNUSED
   -------------------------------------------------------------------------*/
 
 void
-CacheHTTPInfoVector::clear(bool /* destroy ATS_UNUSED */)
+CacheHTTPInfoVector::clear(bool destroy)
 {
 }
 
@@ -311,7 +311,7 @@ CacheHTTPInfoVector::clear(bool /* destroy ATS_UNUSED */)
   -------------------------------------------------------------------------*/
 
 void
-CacheHTTPInfoVector::print(char */* buffer ATS_UNUSED */, size_t /* buf_size 
ATS_UNUSED */, bool /* temps ATS_UNUSED */)
+CacheHTTPInfoVector::print(char *buffer, size_t buf_size, bool temps)
 {
   ink_assert(0);
 }
@@ -329,14 +329,14 @@ CacheHTTPInfoVector::marshal_length()
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 int
-CacheHTTPInfoVector::marshal(char */* buf ATS_UNUSED */, int length)
+CacheHTTPInfoVector::marshal(char *buf, int length)
 {
   ink_assert(0);
   return length;
 }
 
 int
-CacheHTTPInfoVector::unmarshal(const char */* buf ATS_UNUSED */, int /* length 
ATS_UNUSED */, RefCountObj */* block_ptr ATS_UNUSED */)
+CacheHTTPInfoVector::unmarshal(const char *buf, int length, RefCountObj * 
block_ptr)
 {
   ink_assert(0);
   return 0;
@@ -346,7 +346,7 @@ CacheHTTPInfoVector::unmarshal(const char */* buf 
ATS_UNUSED */, int /* length A
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 uint32_t
-CacheHTTPInfoVector::get_handles(const char */* buf ATS_UNUSED */, int /* 
length ATS_UNUSED */, RefCountObj */* block_ptr ATS_UNUSED */)
+CacheHTTPInfoVector::get_handles(const char *buf, int length, RefCountObj * 
block_ptr)
 {
   ink_assert(0);
   return 0;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/cache/CacheRead.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 6121668..f11aee4 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -632,7 +632,6 @@ CacheVC::openReadMain(int /* event ATS_UNUSED */, Event * 
/* e ATS_UNUSED */)
       vio.ndone = doc_len;
       return calluser(VC_EVENT_EOS);
     }
-#ifdef HTTP_CACHE
     HTTPInfo::FragOffset* frags = alternate.get_frag_table();
     if (is_debug_tag_set("cache_seek")) {
       char b[33], c[33];
@@ -700,7 +699,6 @@ CacheVC::openReadMain(int /* event ATS_UNUSED */, Event * 
/* e ATS_UNUSED */)
       key.toHexStr(target_key_str);
       Debug("cache_seek", "Read # %d @ %" PRId64"/%d for %" PRId64, fragment, 
doc_pos, doc->len, bytes);
     }
-#endif
   }
   if (ntodo <= 0)
     return EVENT_CONT;
@@ -1125,13 +1123,7 @@ CacheVC::openReadStartHead(int event, Event * e)
       Debug("cache_read", "CacheReadStartHead - read %s target %s - %s %d of 
%" PRId64" bytes, %d fragments",
             doc->key.toHexStr(xt), key.toHexStr(yt),
             f.single_fragment ? "single" : "multi",
-            doc->len, doc->total_len,
-#ifdef HTTP_CACHE
-            alternate.get_frag_offset_count()
-#else
-            0
-#endif
-            );
+            doc->len, doc->total_len, alternate.get_frag_offset_count());
     }
     // the first fragment might have been gc'ed. Make sure the first
     // fragment is there before returning CACHE_EVENT_OPEN_READ

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/cache/CacheWrite.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index ee2160f..1a35b3f 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -1223,13 +1223,11 @@ CacheVC::openWriteCloseDataDone(int event, Event *e)
     if (!fragment) {
       ink_assert(key == earliest_key);
       earliest_dir = dir;
-#ifdef HTTP_CACHE
     } else {
       // Store the offset only if there is a table.
       // Currently there is no alt (and thence no table) for non-HTTP.
       if (alternate.valid())
         alternate.push_frag_offset(write_pos);
-#endif
     }
     fragment++;
     write_pos += write_len;
@@ -1320,13 +1318,11 @@ CacheVC::openWriteWriteDone(int event, Event *e)
     if (!fragment) {
       ink_assert(key == earliest_key);
       earliest_dir = dir;
-#ifdef HTTP_CACHE
     } else {
       // Store the offset only if there is a table.
       // Currently there is no alt (and thence no table) for non-HTTP.
       if (alternate.valid())
         alternate.push_frag_offset(write_pos);
-#endif
     }
     ++fragment;
     write_pos += write_len;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/cache/I_CacheDefs.h
----------------------------------------------------------------------
diff --git a/iocore/cache/I_CacheDefs.h b/iocore/cache/I_CacheDefs.h
index 6b25873..96337de 100644
--- a/iocore/cache/I_CacheDefs.h
+++ b/iocore/cache/I_CacheDefs.h
@@ -63,7 +63,7 @@ enum CacheType {
 };
 
 // NOTE: All the failures are ODD, and one greater than the success
-//       Some of these must match those in <ts/ts.h>
+//       Some of these must match those in <ts/ts.h> (tested in 
verify_cache_api())
 enum CacheEventType
 {
   CACHE_EVENT_LOOKUP = CACHE_EVENT_EVENTS_START + 0,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/cache/Makefile.am
----------------------------------------------------------------------
diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index c4faaa1..2b89d81 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -19,9 +19,6 @@
 if STANDALONE_IOCORE
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
-  -I$(top_srcdir)/mgmt \
-  -I$(top_srcdir)/mgmt/utils \
-  -I$(top_srcdir)/lib \
   -I$(top_srcdir)/lib/records \
   -I$(top_srcdir)/lib/ts
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/cache/P_CacheInternal.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h
index 929cac5..3c180ac 100644
--- a/iocore/cache/P_CacheInternal.h
+++ b/iocore/cache/P_CacheInternal.h
@@ -357,11 +357,6 @@ struct CacheVC: public CacheVConnection
 #ifdef HTTP_CACHE
   virtual void set_http_info(CacheHTTPInfo *info);
   virtual void get_http_info(CacheHTTPInfo ** info);
-  /** Get the fragment table.
-      @return The address of the start of the fragment table,
-      or @c NULL if there is no fragment table.
-  */
-  virtual HTTPInfo::FragOffset* get_frag_table();
 #endif
   virtual bool is_pread_capable();
   virtual bool set_pin_in_cache(time_t time_pin);
@@ -369,6 +364,12 @@ struct CacheVC: public CacheVConnection
   virtual bool set_disk_io_priority(int priority);
   virtual int get_disk_io_priority();
 
+  /** Get the fragment table.
+      @return The address of the start of the fragment table,
+      or @c NULL if there is no fragment table.
+  */
+  virtual HTTPInfo::FragOffset* get_frag_table();
+
   // offsets from the base stat
 #define CACHE_STAT_ACTIVE  0
 #define CACHE_STAT_SUCCESS 1

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/dns/DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index ba24a8c..a84c8c0 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -194,12 +194,10 @@ DNSProcessor::start(int, size_t stacksize) {
 
   dns_failover_try_period = dns_timeout + 1;    // Modify the "default" 
accordingly
 
-#ifndef STANDALONE_IOCORE
   if (SplitDNSConfig::gsplit_dns_enabled) {
     //reconfigure after threads start
     SplitDNSConfig::reconfigure();
   }
-#endif
 
   // Setup the default DNSHandler, it's used both by normal DNS, and SplitDNS 
(for PTR lookups etc.)
   dns_init();
@@ -375,6 +373,7 @@ DNSEntry::init(const char *x, int len, int qtype_arg, 
Continuation* acont,
     dnsH = dnsProcessor.handler;
   }
 #else
+  INK_NOWARN(adnsH);
   dnsH = dnsProcessor.handler;
 #endif // SPLIT_DNS
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/dns/Makefile.am
----------------------------------------------------------------------
diff --git a/iocore/dns/Makefile.am b/iocore/dns/Makefile.am
index 3d5e59f..507add1 100644
--- a/iocore/dns/Makefile.am
+++ b/iocore/dns/Makefile.am
@@ -19,10 +19,6 @@
 if STANDALONE_IOCORE
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
-  -I. \
-  -I$(top_srcdir)/mgmt \
-  -I$(top_srcdir)/mgmt/utils \
-  -I$(top_srcdir)/lib \
   -I$(top_srcdir)/lib/records \
   -I$(top_srcdir)/lib/ts
 else

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/dns/P_DNSProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/dns/P_DNSProcessor.h b/iocore/dns/P_DNSProcessor.h
index 7df7e10..e5b79f8 100644
--- a/iocore/dns/P_DNSProcessor.h
+++ b/iocore/dns/P_DNSProcessor.h
@@ -292,32 +292,6 @@ private:
   void validate_ip();
 };
 
-/* --------------------------------------------------------------
-   **                struct DNSServer
-
-   A record for an single server
-   -------------------------------------------------------------- */
-struct DNSServer
-{
-  IpEndpoint x_server_ip[MAXNS];
-  char x_dns_ip_line[MAXDNAME * 2];
-
-  char x_def_domain[MAXDNAME];
-  char x_domain_srch_list[MAXDNAME];
-
-  DNSHandler *x_dnsH;
-
-  DNSServer()
-  : x_dnsH(NULL)
-  {
-    memset(x_server_ip, 0, sizeof(x_server_ip));
-
-    memset(x_def_domain, 0, MAXDNAME);
-    memset(x_domain_srch_list, 0, MAXDNAME);
-    memset(x_dns_ip_line, 0, MAXDNAME * 2);
-  }
-};
-
 
 TS_INLINE DNSHandler::DNSHandler()
  : Continuation(NULL), n_con(0), options(0), in_flight(0), name_server(0), 
in_write_dns(0),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/dns/P_SplitDNSProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/dns/P_SplitDNSProcessor.h b/iocore/dns/P_SplitDNSProcessor.h
index b2559ad..6785db1 100644
--- a/iocore/dns/P_SplitDNSProcessor.h
+++ b/iocore/dns/P_SplitDNSProcessor.h
@@ -129,6 +129,33 @@ TS_INLINE bool SplitDNSConfig::isSplitDNSEnabled()
 
 
 /* --------------------------------------------------------------
+   **                struct DNSServer
+
+   A record for an single server
+   -------------------------------------------------------------- */
+struct DNSServer
+{
+  IpEndpoint x_server_ip[MAXNS];
+  char x_dns_ip_line[MAXDNAME * 2];
+
+  char x_def_domain[MAXDNAME];
+  char x_domain_srch_list[MAXDNAME];
+
+  DNSHandler *x_dnsH;
+
+  DNSServer()
+  : x_dnsH(NULL)
+  {
+    memset(x_server_ip, 0, sizeof(x_server_ip));
+
+    memset(x_def_domain, 0, MAXDNAME);
+    memset(x_domain_srch_list, 0, MAXDNAME);
+    memset(x_dns_ip_line, 0, MAXDNAME * 2);
+  }
+};
+
+
+/* --------------------------------------------------------------
    **                class DNSRequestData
 
    A record for an single server

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index e421475..0b114b4 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -2460,7 +2460,7 @@ run_HostDBTest()
   if (is_action_tag_set("hostdb_test_rr"))
     eventProcessor.schedule_every(new HostDBTestRR, HRTIME_SECONDS(1), ET_NET);
   if (is_action_tag_set("hostdb_test_reverse")) {
-    eventProcessor.schedule_imm(new HostDBTestReverse, ET_CALL);
+    eventProcessor.schedule_imm(new HostDBTestReverse, ET_CACHE);
   }
 }
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/hostdb/Makefile.am
----------------------------------------------------------------------
diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am
index 90381d7..e1edef6 100644
--- a/iocore/hostdb/Makefile.am
+++ b/iocore/hostdb/Makefile.am
@@ -19,9 +19,6 @@
 if STANDALONE_IOCORE
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
-  -I$(top_srcdir)/mgmt \
-  -I$(top_srcdir)/mgmt/utils \
-  -I$(top_srcdir)/lib \
   -I$(top_srcdir)/lib/records \
   -I$(top_srcdir)/lib/ts
 else

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/hostdb/MultiCache.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/MultiCache.cc b/iocore/hostdb/MultiCache.cc
index bd0fdb0..a9a6ceb 100644
--- a/iocore/hostdb/MultiCache.cc
+++ b/iocore/hostdb/MultiCache.cc
@@ -34,7 +34,6 @@
 #include "P_HostDB.h"
 #else
 //extern const char *system_config_directory;
-extern int hostdb_sync_frequency;
 #endif
 
 #include "P_MultiCache.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/net/Makefile.am
----------------------------------------------------------------------
diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index b19c36b..266da46 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -19,9 +19,6 @@
 if STANDALONE_IOCORE
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
-  -I$(top_srcdir)/mgmt \
-  -I$(top_srcdir)/mgmt/utils \
-  -I$(top_srcdir)/lib \
   -I$(top_srcdir)/lib/records \
   -I$(top_srcdir)/lib/ts
 else
@@ -32,7 +29,6 @@ AM_CPPFLAGS = \
   -I$(top_srcdir)/lib/ts \
   -I$(top_srcdir)/proxy \
   -I$(top_srcdir)/proxy/hdrs \
-  -I$(top_srcdir)/proxy/shared \
   -I$(top_srcdir)/mgmt \
   -I$(top_srcdir)/mgmt/preparse \
   -I$(top_srcdir)/mgmt/utils

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/iocore/net/Socks.cc
----------------------------------------------------------------------
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index 88b22e5..5f37919 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -122,7 +122,7 @@ SocksEntry::findServer()
 #else
   if (nattempts > netProcessor.socks_conf_stuff->connection_attempts)
     memset(&server_addr, 0, sizeof(server_addr));
-  else ats_ip_copy(&server_addr, &g_socks_conf_stuff->server_addr);
+  else ats_ip_copy(server_addr, g_socks_conf_stuff->socks_server);
 #endif // SOCKS_WITH_TS
 
   char buff[INET6_ADDRSTRLEN];

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/lib/records/RecMessage.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecMessage.cc b/lib/records/RecMessage.cc
index 8c84c8b..87c59ca 100644
--- a/lib/records/RecMessage.cc
+++ b/lib/records/RecMessage.cc
@@ -39,8 +39,6 @@ static void *g_recv_cookie = NULL;
 //-------------------------------------------------------------------------
 #if defined (REC_BUILD_STAND_ALONE)
 
-extern RecModeT g_mode_type;
-
 static LLQ *g_send_llq = NULL;
 static LLQ *g_recv_llq = NULL;
 
@@ -73,7 +71,7 @@ send_thr(void *data)
 static void *
 recv_thr(void *data)
 {
-  int msg_size = 0;
+  int msg_size;
   RecMessageHdr msg_hdr;
   RecMessage *msg;
   RecHandle h_pipe = (RecHandle)(intptr_t)data;
@@ -147,7 +145,7 @@ RecMessageInit()
   g_send_llq = create_queue();
   g_recv_llq = create_queue();
 
-  switch (g_mode_type) {
+  switch (mode_type) {
   case RECM_CLIENT:
     h_pipe = RecPipeConnect(Layout::get()->runtimedir, REC_PIPE_NAME);
     if (h_pipe == REC_HANDLE_INVALID) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/proxy/Initialize.cc
----------------------------------------------------------------------
diff --git a/proxy/Initialize.cc b/proxy/Initialize.cc
index be296b2..c74b0f5 100644
--- a/proxy/Initialize.cc
+++ b/proxy/Initialize.cc
@@ -37,9 +37,7 @@
 #include "I_Version.h"
 
 #include "Initialize.h" // TODO: move to I_Initialize.h ???
-#include "ink_sys_control.h"
 
-extern char* admin_user;
 
 //
 // Initialize operating system related information/services
@@ -63,7 +61,7 @@ init_system_settings(void)
 #endif
 
 static int
-set_core_size(const char */* name ATS_UNUSED */, RecDataT /* data_type 
ATS_UNUSED */, RecData data, void */* opaque_token ATS_UNUSED */)
+set_core_size(const char *name, RecDataT data_type, RecData data, void 
*opaque_token)
 {
 
   RecInt size = data.rec_int;
@@ -239,35 +237,6 @@ init_system_reconfigure_diags(void)
 
 }
 
-void
-chown_file_to_user(const char *file, const char *user)
-{
-  struct passwd *pwd = NULL;
-
-  if (user && *user) {
-    if (*user == '#') {
-      int uid = atoi(user + 1);
-      if (uid == -1) {
-        // XXX: Can this call hapen after setuid?
-        uid = (int)geteuid();
-      }
-      pwd = getpwuid((uid_t)uid);
-    } else {
-      pwd = getpwnam(user);
-    }
-    if (pwd) {
-      if (chown(file, pwd->pw_uid, pwd->pw_gid) < 0) {
-          diags->print(NULL, DL_Warning, __FILE__, __FUNCTION__, __LINE__, 
"cop couldn't chown the  file: '%s' [%d] %s\n",
-         file, errno, strerror(errno)
-       );
-      }
-    } else {
-        diags->print(NULL, DL_Warning, __FILE__, __FUNCTION__, __LINE__, 
"can't get passwd entry for the admin user '%s' - [%d] %s\n", user, errno, 
strerror(errno));
-    }
-  } else {
-      diags->print(NULL, DL_Warning, __FILE__, __FUNCTION__, __LINE__, "Admin 
user was the empty string.\n");
-  }
-}
 
 void
 init_system_diags(char *bdt, char *bat)
@@ -281,7 +250,7 @@ init_system_diags(char *bdt, char *bat)
   diags_log_fp = fopen(diags_logpath, "w");
   if (diags_log_fp) {
     int status;
-    chown_file_to_user(diags_logpath, admin_user);
+    chown_file_to_user(diag_logpath,admin_user);
     status = setvbuf(diags_log_fp, NULL, _IOLBF, 512);
     if (status != 0) {
       fclose(diags_log_fp);
@@ -293,10 +262,10 @@ init_system_diags(char *bdt, char *bat)
   if (diags_log_fp == NULL) {
     SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
 
-    diags->print(NULL, DL_Warning, __FILE__, __FUNCTION__, __LINE__,
+    diags->print(NULL, DL_Warning, NULL, &loc,
                  "couldn't open diags log file '%s', " "will not log to this 
file", diags_logpath);
   } else {
-    diags->print(NULL, DL_Status, "STATUS", NULL, 0, "opened %s", 
diags_logpath);
+    diags->print(NULL, DL_Status, "STATUS", NULL, "opened %s", diags_logpath);
   }
 
   init_system_reconfigure_diags();

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/proxy/Initialize.h
----------------------------------------------------------------------
diff --git a/proxy/Initialize.h b/proxy/Initialize.h
index 556f251..485f8e7 100644
--- a/proxy/Initialize.h
+++ b/proxy/Initialize.h
@@ -49,7 +49,7 @@ void init_system_syslog_log_configure(void);
 //void init_system_logging();
 void init_system_reconfigure_diags(void);
 void init_system_diags(char *bdt, char *bat);
-void chown_file_to_user(const char *file, const char *user);
+
 void init_system_adjust_num_of_net_threads(void);
 
 //void initialize_standalone();

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b9b1bdc8/proxy/shared/UglyLogStubs.cc
----------------------------------------------------------------------
diff --git a/proxy/shared/UglyLogStubs.cc b/proxy/shared/UglyLogStubs.cc
index 9690571..0a048e8 100644
--- a/proxy/shared/UglyLogStubs.cc
+++ b/proxy/shared/UglyLogStubs.cc
@@ -196,7 +196,6 @@ UnixNetProcessor::freeThread(UnixNetVConnection * /* vc 
ATS_UNUSED */, EThread *
 // For Intel ICC
 int cache_config_mutex_retry_delay = 2;
 
-#include "I_SplitDNSProcessor.h"
 void
 SplitDNSConfig::reconfigure()
 {

Reply via email to