trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geor...@apache.org
Subject svn commit: r910802 - in /incubator/trafficserver/traffic/branches/dev: ./ ci/ iocore/net/ proxy/ proxy/api/include/ proxy/config/ proxy/http2/ proxy/http2/remap/ proxy/mgmt2/ proxy/mgmt2/cop/ proxy/mgmt2/html2/ proxy/mgmt2/html2/agent-installer/ proxy...
Date Wed, 17 Feb 2010 02:26:21 GMT
Author: georgep
Date: Wed Feb 17 02:26:20 2010
New Revision: 910802

URL: http://svn.apache.org/viewvc?rev=910802&view=rev
Log:
Merge changes from TS-150,TS-183,TS-90,TS-165,TS-87,TS-186,TS-187 from trunk to dev branch.

Added:
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/Trie.h
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/http2/remap/Trie.h
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMappingPathIndex.cc
      - copied, changed from r910774, incubator/trafficserver/traffic/trunk/proxy/http2/remap/UrlMappingPathIndex.cc
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMappingPathIndex.h
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/http2/remap/UrlMappingPathIndex.h
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/agent-installer/Makefile.am
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/mgmt2/html2/agent-installer/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/charting/Makefile.am
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/mgmt2/html2/charting/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/configure/Makefile.am
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/mgmt2/html2/configure/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/configure/helper/Makefile.am
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/mgmt2/html2/configure/helper/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/images/Makefile.am
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/mgmt2/html2/images/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/include/Makefile.am
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/mgmt2/html2/include/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/monitor/Makefile.am
      - copied unchanged from r910774, incubator/trafficserver/traffic/trunk/proxy/mgmt2/html2/monitor/Makefile.am
Removed:
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UmsHelper.cc
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UmsHelper.h
Modified:
    incubator/trafficserver/traffic/branches/dev/   (props changed)
    incubator/trafficserver/traffic/branches/dev/.gitignore
    incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt
    incubator/trafficserver/traffic/branches/dev/configure.ac
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc
    incubator/trafficserver/traffic/branches/dev/proxy/InkAPI.cc
    incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.cc
    incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.h
    incubator/trafficserver/traffic/branches/dev/proxy/api/include/InkAPI.h
    incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config
    incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.cc
    incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.h
    incubator/trafficserver/traffic/branches/dev/proxy/http2/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/StringHash.cc
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.cc
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.h
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.h
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.h
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/RecordsConfig.cc
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Rollback.cc
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cop/TrafficCop.cc
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/mrtg/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/navigation_tree.xml
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/tune/Makefile.am
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/utils/WebMgmtUtils.cc
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebHttpTree.cc
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebIntrMain.cc

Propchange: incubator/trafficserver/traffic/branches/dev/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 17 02:26:20 2010
@@ -1 +1 @@
-/incubator/trafficserver/traffic/trunk:891822-909852
+/incubator/trafficserver/traffic/trunk:891822-910781

Modified: incubator/trafficserver/traffic/branches/dev/.gitignore
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/.gitignore?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/.gitignore (original)
+++ incubator/trafficserver/traffic/branches/dev/.gitignore Wed Feb 17 02:26:20 2010
@@ -47,6 +47,7 @@
 proxy/mgmt2/tools/time_config
 proxy/mgmt2/tools/vip_config
 proxy/mgmt2/traffic_manager
+proxy/mgmt2/html2/tune/navigation_tree.xml
 proxy/traffic_server
 
 libtool
@@ -57,3 +58,4 @@
 m4/lt~obsolete.m4
 
 install/trafficserver
+

Modified: incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt (original)
+++ incubator/trafficserver/traffic/branches/dev/ci/rat-excludes.txt Wed Feb 17 02:26:20 2010
@@ -69,3 +69,4 @@
 test/deft/defs/climatelab.def
 test/deft/defs/localhost.def
 test/plugin/INKHttpHooksTrans/altSelect.notes
+proxy/mgmt2/html2/tune/navigation_tree.xml

Modified: incubator/trafficserver/traffic/branches/dev/configure.ac
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/configure.ac?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/configure.ac (original)
+++ incubator/trafficserver/traffic/branches/dev/configure.ac Wed Feb 17 02:26:20 2010
@@ -230,6 +230,20 @@
 AC_SUBST([enable_remote_cov_commit])
 
 #
+# WebUI
+#
+AC_MSG_CHECKING([whether to enable Web UI])
+AC_ARG_ENABLE([webui],
+  [AS_HELP_STRING([--enable-webui],[enable Web UI])],
+  [],
+  [enable_webui=no]
+)
+AC_MSG_RESULT([$enable_webui])
+AS_IF([test "x$enable_webui" = "xno"],
+  [AC_DEFINE([NO_WEBUI],1,[disable Web UI])]
+)
+
+#
 # API
 #
 
@@ -881,6 +895,15 @@
 AC_CONFIG_FILES([proxy/mgmt2/cluster/Makefile])
 AC_CONFIG_FILES([proxy/mgmt2/cop/Makefile])
 AC_CONFIG_FILES([proxy/mgmt2/html2/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/agent-installer/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/charting/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/configure/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/configure/helper/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/images/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/include/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/monitor/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/mrtg/Makefile])
+AC_CONFIG_FILES([proxy/mgmt2/html2/tune/Makefile])
 AC_CONFIG_FILES([proxy/mgmt2/Makefile])
 AC_CONFIG_FILES([proxy/mgmt2/preparse/Makefile])
 AC_CONFIG_FILES([proxy/mgmt2/stats/Makefile])

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc Wed Feb 17 02:26:20 2010
@@ -124,6 +124,7 @@
     vc->accept_port = ntohs(na->server.sa.sin_port);
     vc->mutex = new_ProxyMutex();
     vc->action_ = *na->action_;
+    vc->closed  = 0;
     SET_CONTINUATION_HANDLER(vc, (NetVConnHandler) & UnixNetVConnection::acceptEvent);
 
     if (e->ethread->is_event_type(na->etype))

Modified: incubator/trafficserver/traffic/branches/dev/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/InkAPI.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/InkAPI.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/InkAPI.cc Wed Feb 17 02:26:20 2010
@@ -4945,6 +4945,28 @@
   return action;
 }
 
+INKAction INKHttpSchedule(INKCont contp ,INKHttpTxn txnp, unsigned int timeout)
+{
+  if (sdk_sanity_check_iocore_structure (contp) != INK_SUCCESS)
+    return (INKAction) INK_ERROR_PTR;
+
+  FORCE_PLUGIN_MUTEX(contp);
+  INKAction action;
+  Continuation *cont  = (Continuation*)contp;
+  HttpSM *sm = (HttpSM*)txnp;
+  sm->set_http_schedule(cont);
+
+  if (timeout == 0) { 
+    action = eventProcessor.schedule_imm (sm, ET_NET);
+  } else {
+    action = eventProcessor.schedule_in (sm, HRTIME_MSECONDS (timeout), ET_NET);
+  }    
+
+  action = (INKAction) ((paddr_t) action | 0x1);
+
+  return action;
+}
+
 int
 INKContCall(INKCont contp, INKEvent event, void *edata)
 {

Modified: incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.cc Wed Feb 17 02:26:20 2010
@@ -43,7 +43,6 @@
 #include "RemapProcessor.h"
 #include "UrlRewrite.h"
 #include "UrlMapping.h"
-#include "UmsHelper.h"
 #include "StringHash.h"
 #include "ink_unused.h"      /* MAGIC_EDITING_TAG */
 

Modified: incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.h?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/ReverseProxy.h Wed Feb 17 02:26:20 2010
@@ -40,7 +40,6 @@
 #include "HttpTransact.h"
 #include "RemapPluginInfo.h"
 #include "UrlRewrite.h"
-#include "UmsHelper.h"
 #include "UrlMapping.h"
 
 #define EMPTY_PORT_MAPPING (ink32)~0

Modified: incubator/trafficserver/traffic/branches/dev/proxy/api/include/InkAPI.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/api/include/InkAPI.h?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/api/include/InkAPI.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/api/include/InkAPI.h Wed Feb 17 02:26:20 2010
@@ -1934,6 +1934,7 @@
   inkapi INKReturnCode INKContDataSet(INKCont contp, void *data);
   inkapi void *INKContDataGet(INKCont contp);
   inkapi INKAction INKContSchedule(INKCont contp, unsigned int timeout);
+  inkapi INKAction INKHttpSchedule(INKCont contp, INKHttpTxn txnp, unsigned int timeout);
   inkapi int INKContCall(INKCont contp, INKEvent event, void *edata);
   inkapi INKMutex INKContMutexGet(INKCont contp);
 

Modified: incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/config/storage.config Wed Feb 17 02:26:20 2010
@@ -19,8 +19,8 @@
 #
 # Example: 512MB cache file(/usr/local/var/trafficserver/cache.db) 
 #          assuming prefix of '/usr/local'
-#./var/trafficserver 536870912
-./var/trafficserver 134217728
+./var/trafficserver 536870912
+#./var/trafficserver 134217728
 #
 #
 #############################################################

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.cc Wed Feb 17 02:26:20 2010
@@ -7818,3 +7818,37 @@
 
   DUMP_HEADER("http_hdrs", &t_state.hdr_info.client_request, sm_id, "Framed Client Request..checking");
 }
+
+void HttpSM::set_http_schedule(Continuation *contp)
+{
+  HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::get_http_schedule);
+  schedule_cont = contp;
+}
+
+int HttpSM::get_http_schedule(int event, void * data)
+{
+  bool plugin_lock;
+  Ptr <ProxyMutex> plugin_mutex;
+  if (schedule_cont->mutex) {
+    plugin_mutex = schedule_cont->mutex;
+    plugin_lock = MUTEX_TAKE_TRY_LOCK(schedule_cont->mutex, mutex->thread_holding);
+
+    if (!plugin_lock) {
+      HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::get_http_schedule);
+      ink_debug_assert(pending_action == NULL);
+      pending_action = mutex->thread_holding->schedule_in(this, HRTIME_MSECONDS(10));
+      return 0;
+    }    
+  } else {
+    plugin_lock = false;
+  }    
+
+  //handle Mutex;
+  schedule_cont->handleEvent ( event, this);
+  if (plugin_lock) {
+    Mutex_unlock(plugin_mutex, mutex->thread_holding);
+  }    
+
+  return 0;
+}
+

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.h?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpSM.h Wed Feb 17 02:26:20 2010
@@ -310,6 +310,8 @@
   HttpClientSession *ua_session;
   BackgroundFill_t background_fill;
   //AuthHttpAdapter authAdapter;
+  void set_http_schedule(Continuation *);
+  int get_http_schedule(int event, void *data);
 
 protected:
   IOBufferReader * ua_buffer_reader;
@@ -332,6 +334,7 @@
   HttpSMHandler default_handler;
   Action *pending_action;
   Action *historical_action;
+  Continuation *schedule_cont;
 
   HTTPParser http_parser;
   void start_sub_sm();

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/Makefile.am?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/Makefile.am (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/Makefile.am Wed Feb 17 02:26:20 2010
@@ -90,9 +90,11 @@
   remap/RemapProcessor.h \
   remap/StringHash.cc \
   remap/StringHash.h \
-  remap/UmsHelper.cc \
-  remap/UmsHelper.h \
   remap/UrlMapping.cc \
   remap/UrlMapping.h \
   remap/UrlRewrite.cc \
-  remap/UrlRewrite.h
+  remap/UrlRewrite.h \
+  remap/Trie.h \
+  remap/UrlMappingPathIndex.h \
+  remap/UrlMappingPathIndex.cc
+

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/StringHash.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/StringHash.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/StringHash.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/StringHash.cc Wed Feb 17 02:26:20 2010
@@ -24,7 +24,6 @@
 #include "StringHash.h"
 #include "Main.h"
 #include "Error.h"
-#include "UmsHelper.h"
 
 
 // ===============================================================================

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.cc Wed Feb 17 02:26:20 2010
@@ -27,12 +27,10 @@
  * 
 **/
 url_mapping::url_mapping(int rank /* = 0 */)
-:next(NULL), next_root_schema(NULL), next_schema(NULL), next_empty(NULL),
-next_unique(NULL), next_hash(NULL), lookup_helper(NULL), from_path_len(0), fromURL(), toURL(),
-homePageRedirect(false), unique(false), default_redirect_url(false), optional_referer(false),
-negative_referer(false), no_negative_cache(false), wildcard_from_scheme(false), pristine_host_hdr(-1),
-chunking_enabled(-1), tag(NULL), filter_redirect_url(NULL), map_id(0), referer_list(0), redir_chunk_list(0),
-filter(NULL), _plugin_count(0), _cur_instance_count(0), _rank(rank)
+  : from_path_len(0), fromURL(), toURL(), homePageRedirect(false), unique(false), default_redirect_url(false), 
+    optional_referer(false), negative_referer(false), no_negative_cache(false), wildcard_from_scheme(false), 
+    pristine_host_hdr(-1), chunking_enabled(-1), tag(NULL), filter_redirect_url(NULL), referer_list(0), 
+    redir_chunk_list(0), filter(NULL), _plugin_count(0), _cur_instance_count(0), _rank(rank)
 { /* nop */ ;
 }
 
@@ -146,10 +144,6 @@
   redirect_tag_str *rc;
   acl_filter_rule *afr;
 
-  if (lookup_helper) {
-    delete lookup_helper;
-    lookup_helper = NULL;
-  }
   if (tag) {
     tag = (char *) xfree_null(tag);
   }

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.h?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMapping.h Wed Feb 17 02:26:20 2010
@@ -24,7 +24,6 @@
 #ifndef _URL_MAPPING_H_
 #define _URL_MAPPING_H_
 
-#include "UmsHelper.h"
 #include "AclFiltering.h"
 #include <deque>
 #include <map>
@@ -35,8 +34,6 @@
 #include "RemapPluginInfo.h"
 #include "HttpTransact.h"
 
-class ums_helper;
-
 /**
  * Used to store http referer strings (and/or regexp) 
 **/
@@ -103,13 +100,6 @@
 public:
   url_mapping(int rank = 0);
   ~url_mapping();
-  url_mapping *next;            // next in main list (primary hash by host name)
-  url_mapping *next_root_schema;        // list of different schemas (valid only for root nodes)
-  url_mapping *next_schema;     // next with the same schema
-  url_mapping *next_empty;      // next in ums_helper.empty_list
-  url_mapping *next_unique;     // next in ums_helper.unique_list
-  url_mapping *next_hash;       // next in hash table list
-  ums_helper *lookup_helper;    // primary helper (from host name hash list)
 
   bool add_plugin(remap_plugin_info *);
   remap_plugin_info *get_plugin(unsigned int);

Copied: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMappingPathIndex.cc (from r910774, incubator/trafficserver/traffic/trunk/proxy/http2/remap/UrlMappingPathIndex.cc)
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMappingPathIndex.cc?p2=incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMappingPathIndex.cc&p1=incubator/trafficserver/traffic/trunk/proxy/http2/remap/UrlMappingPathIndex.cc&r1=910774&r2=910802&rev=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/remap/UrlMappingPathIndex.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlMappingPathIndex.cc Wed Feb 17 02:26:20 2010
@@ -20,6 +20,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 */
+#include "ink_config.h"
 #include "UrlMappingPathIndex.h"
 
 bool

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc Wed Feb 17 02:26:20 2010
@@ -32,6 +32,7 @@
 #include "MatcherUtils.h"
 #include "Tokenizer.h"
 #include "RemapAPI.h"
+#include "UrlMappingPathIndex.h"
 
 #include "ink_string.h"
 
@@ -648,16 +649,20 @@
 {
   InkHashTableEntry *ht_entry;
   InkHashTableIteratorState ht_iter;
-  url_mapping *value;
-  url_mapping *next;
+  UrlMappingPathIndex *item;
+  UrlMappingPathIndex::MappingList mappings;
 
   if (h_table != NULL) {        // Iterate over the hash tabel freeing up the all the url_mappings
     //   contained with in
     for (ht_entry = ink_hash_table_iterator_first(h_table, &ht_iter); ht_entry != NULL;) {
-      for (value = (url_mapping *) ink_hash_table_entry_value(h_table, ht_entry); value; value = next) {
-        next = value->next;
-        delete value;
+      item = (UrlMappingPathIndex *) ink_hash_table_entry_value(h_table, ht_entry);
+      item->GetMappings(mappings);
+      for (UrlMappingPathIndex::MappingList::iterator mapping_iter = mappings.begin(); 
+           mapping_iter != mappings.end(); ++mapping_iter) {
+        delete *mapping_iter;
       }
+      mappings.clear();
+      delete item;
       ht_entry = ink_hash_table_iterator_next(h_table, &ht_iter);
     }
     ink_hash_table_destroy(h_table);
@@ -699,18 +704,25 @@
 {
   InkHashTableEntry *ht_entry;
   InkHashTableIteratorState ht_iter;
-  url_mapping *value;
+  UrlMappingPathIndex *value;
   char from_url_buf[2048], to_url_buf[2048];
+  UrlMappingPathIndex::MappingList mappings;
+  url_mapping *um;
 
   for (ht_entry = ink_hash_table_iterator_first(h_table, &ht_iter); ht_entry != NULL;) {
-    for (value = (url_mapping *) ink_hash_table_entry_value(h_table, ht_entry); value; value = value->next) {
-      value->fromURL.string_get_buf(from_url_buf, (int) sizeof(from_url_buf));
-      value->toURL.string_get_buf(to_url_buf, (int) sizeof(to_url_buf));
+    value = (UrlMappingPathIndex *) ink_hash_table_entry_value(h_table, ht_entry); 
+    value->GetMappings(mappings);
+    for (UrlMappingPathIndex::MappingList::iterator mapping_iter = mappings.begin();
+         mapping_iter != mappings.end(); ++mapping_iter) {
+      um = *mapping_iter;
+      um->fromURL.string_get_buf(from_url_buf, (int) sizeof(from_url_buf));
+      um->toURL.string_get_buf(to_url_buf, (int) sizeof(to_url_buf));
       printf("\t %s %s=> %s %s <%s> [plugins %s enabled; running with %d plugins]\n", from_url_buf,
-             value->unique ? "(unique)" : "", to_url_buf,
-             value->homePageRedirect ? "(R)" : "", value->tag ? value->tag : "",
-             value->_plugin_count > 0 ? "are" : "not", value->_plugin_count);
+             um->unique ? "(unique)" : "", to_url_buf,
+             um->homePageRedirect ? "(R)" : "", um->tag ? um->tag : "",
+             um->_plugin_count > 0 ? "are" : "not", um->_plugin_count);
     }
+    mappings.clear();
     ht_entry = ink_hash_table_iterator_next(h_table, &ht_iter);
   }
 }
@@ -724,12 +736,10 @@
 UrlRewrite::_tableLookup(InkHashTable * h_table, URL * request_url,
                         int request_port, const char *request_host, int request_host_len, char *tag)
 {
-  url_mapping *ht_entry, *um;
-  ums_helper *lh;
+  UrlMappingPathIndex *ht_entry;
+  url_mapping *um = NULL;
   char host_lower_buf[1024], *request_host_lower, *xfree_buf_ptr;
-  const char *from_path, *request_path, *request_url_scheme;
-  URL *map_from;
-  int ht_result, tmp, from_path_len, request_path_len;
+  int ht_result, tmp;
 
   if (unlikely(!request_host || !request_url || request_host_len < 0))
     return NULL;
@@ -758,58 +768,9 @@
     xfree(xfree_buf_ptr);
 
   if (likely(ht_result && ht_entry)) {
-    request_path = request_url->path_get(&request_path_len);    // do it only once
-    request_url_scheme = request_url->scheme_get(&tmp);
-
-    for (um = ht_entry; um; um = um->next_root_schema) {
-      if (um->fromURL.scheme_get(&tmp) == request_url_scheme ||
-          (request_url_scheme == URL_SCHEME_HTTPS && um->wildcard_from_scheme))
-        break;
-    }
-    if (unlikely((ht_entry = um) == NULL))
-      return NULL;              /* we don't have such scheme in our list */
-
-    if (likely((lh = ht_entry->lookup_helper) != NULL)) {
-      if (unlikely(!request_path))      // extreme case - return first best match from empty list or NULL
-      {
-        return lh->lookup_best_empty(request_host, request_port, tag);
-      }
-      // request_path != NULL
-      return lh->lookup_best_notempty(ht_entry, request_host, request_port, request_path, request_path_len, tag);
-    }
-    // backup search method - old search without lookup_helper
-    // Search through the chain of remappings for this hostname
-    //   until we find one that matches.  We take the first matching
-    //   remap because the chain is stored in the order of the configuration
-    //   file and earlier entries in the file take precedence over later
-    //   entries
-    for (; ht_entry; ht_entry = ht_entry->next) { 
-      // If the incoming request has no tag but the entry does, or both
-      // have tags that do not match, then we do NOT have a match.
-      bool tags_match = (ht_entry->tag && (!tag || strcmp(tag, ht_entry->tag))) ? false : true;
-
-      map_from = &ht_entry->fromURL;
-      if (tags_match &&
-          (request_url_scheme == map_from->scheme_get(&tmp) ||
-           (request_url_scheme == URL_SCHEME_HTTPS && ht_entry->wildcard_from_scheme)) &&
-          // If the request had no determinable host do not check
-          //  the port since the map_from URL will not have a port
-          //  number other than the default port
-          (*request_host == '\0' || request_port == map_from->port_get())) {    // Port and scheme match so check the path
-        from_path = map_from->path_get(&from_path_len);
-
-        if (ht_entry->unique) {
-          if ((!from_path && !request_path) || (from_path && request_path &&
-                                                from_path_len == request_path_len &&
-                                                !strncmp(from_path, request_path, from_path_len)))
-            return ht_entry;
-        } else if (!from_path || (request_path && request_path_len >= from_path_len &&
-                                  !strncmp(from_path, request_path, from_path_len)))
-          return ht_entry;
-      }
-    }                           /* end for */
+    um = ht_entry->Search(request_url, request_port);
   }
-  return NULL;
+  return um;
 }
 
 /**
@@ -885,8 +846,10 @@
   if (!plugin_modified_host)
     request_url->host_set(toHost, toHostLen);
 
-  if (!plugin_modified_port && (requestPort != map_to->port_get()))
+  if (!plugin_modified_port && 
+      ((requestPort != map_to->port_get()) || map_to->port_get_raw())) {
     request_url->port_set(map_to->port_get_raw());
+  }
 
   // Extra byte is potentially needed for prefix path '/'.
   // Added an extra 3 so that TS wouldn't crash in the field.
@@ -2131,97 +2094,10 @@
 
   xfree(file_buf);
 
-  CreateLookupHelper(forward_mappings.hash_lookup);
-  CreateLookupHelper(reverse_mappings.hash_lookup);
-  CreateLookupHelper(permanent_redirects.hash_lookup);
-  CreateLookupHelper(temporary_redirects.hash_lookup);
-
   return 0;
 }
 
 /**
-  Create lookup helper info inside first url_mapping in hash list.
-  Since remap pattern can be different for each host we should adjust
-  lookup parameters for each hash hit list.
-
-*/
-void
-UrlRewrite::CreateLookupHelper(InkHashTable * h_table)
-{
-  InkHashTableEntry *ht_entry;
-  InkHashTableIteratorState ht_iter;
-  url_mapping *um_root, *um, *ul, **uppe, **uppu;
-  ums_helper *lh;
-  const char *from_path;
-  int from_path_len, i;
-
-  if (h_table) {
-    for (ht_entry = ink_hash_table_iterator_first(h_table, &ht_iter); ht_entry != NULL;) {
-      if (likely((um_root = (url_mapping *) ink_hash_table_entry_value(h_table, ht_entry)) != NULL)) {
-        for (um = um_root->next; um; um = um->next) {
-          from_path = um->fromURL.scheme_get(&i);
-          for (ul = um_root; ul; ul = ul->next_root_schema) {
-            if (ul->fromURL.scheme_get(&from_path_len) == from_path && i == from_path_len)
-              break;
-          }
-          if (likely(ul)) {
-            for (uppu = &ul->next_schema; *uppu; uppu = &((*uppu)->next_schema));
-          } else {
-            for (uppu = &um_root->next_root_schema; *uppu; uppu = &((*uppu)->next_root_schema));
-          }
-          *uppu = um;
-        }
-        // create lookup helper for each scheme
-        for (um = um_root; um; um = um->next_root_schema) {
-          if (unlikely(um->lookup_helper)) {
-            delete um->lookup_helper;
-            um->lookup_helper = NULL;
-          }
-          um->lookup_helper = (lh = NEW(new ums_helper()));
-          lh->min_path_size = 1024 * 256;
-
-          uppe = &lh->empty_list;
-          uppu = &lh->unique_list;
-
-          for (ul = um; ul; ul = ul->next_schema) {
-            // #1. check unique flag
-            if (ul->unique) {
-              *uppu = ul;
-              uppu = &ul->next_unique;
-            }
-            // #2. check min & max path size
-            if (NULL == (from_path = ul->fromURL.path_get(&from_path_len))) {
-              *uppe = ul;
-              uppe = &ul->next_empty;
-              from_path_len = 0;
-            }
-            if (lh->max_path_size < from_path_len)
-              lh->max_path_size = from_path_len;
-            if (lh->min_path_size > from_path_len) {
-              lh->min_path_size = from_path_len;
-            }
-            if (unlikely(lh->min_path_size > lh->max_path_size))
-              lh->min_path_size = lh->max_path_size;
-            if (ul->tag)
-              lh->tag_present = true;
-            lh->map_cnt++;
-          }
-          // create hash table only if empty and unique lists are empty
-          if (!lh->empty_list && !lh->unique_list && lh->min_path_size > 0 && lh->map_cnt > 1) {
-            if (lh->init_hash_table() && lh->load_hash_table(um) && lh->hash_table->max_hit_level > 3) {
-              lh->delete_hash_table();
-              lh->init_hash_table(lh->map_cnt << 1);
-              lh->load_hash_table(um);
-            }
-          }
-        }
-      }
-      ht_entry = ink_hash_table_iterator_next(h_table, &ht_iter);
-    }
-  }
-}
-
-/**
   Inserts arg mapping in h_table with key src_host chaining the mapping
   of existing entries bound to src_host if necessary.
 
@@ -2230,22 +2106,27 @@
 UrlRewrite::TableInsert(InkHashTable * h_table, url_mapping * mapping, char *src_host)
 {
   char src_host_tmp_buf[1];
-  url_mapping *ht_contents;
+  UrlMappingPathIndex *ht_contents;
 
   if (!src_host) {
     src_host = &src_host_tmp_buf[0];
     src_host_tmp_buf[0] = 0;
   }
   // Insert the new_mapping into hash table
-  if (ink_hash_table_lookup(h_table, src_host, (void **) &ht_contents)) {       // There is already a mapping so chain the entries
-    //   Be sure to preserve the order of the file so that we can resolve
-    //    conflicting directives
-    if (ht_contents != NULL) {
-      for (; ht_contents->next; ht_contents = ht_contents->next);
-      (ht_contents->next = mapping)->next = NULL;
+  if (ink_hash_table_lookup(h_table, src_host, (void**) &ht_contents)) {       
+    // There is already a path index for this host
+    if (ht_contents == NULL) {
+      // why should this happen?
+      Error("Found entry cannot be null!");
+      return;
     }
   } else {
-    ink_hash_table_insert(h_table, src_host, mapping);
+    ht_contents = new UrlMappingPathIndex();
+    ink_hash_table_insert(h_table, src_host, ht_contents);
+  }
+  if (!ht_contents->Insert(mapping)) {
+    Error("Could not insert new mapping");
+    // @todo - should we delete these now?
   }
 }
 

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.h?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.h Wed Feb 17 02:26:20 2010
@@ -26,7 +26,6 @@
 
 #include "StringHash.h"
 #include "UrlMapping.h"
-#include "UmsHelper.h"
 
 #ifdef HAVE_PCRE_PCRE_H
 #include <pcre/pcre.h>
@@ -83,7 +82,6 @@
   UrlRewrite(char *file_var_in);
    ~UrlRewrite();
   int BuildTable();
-  void CreateLookupHelper(InkHashTable * h_table);
   bool Remap(HttpTransact::State * s, HTTPHdr * request_header, char **redirect_url, char **orig_url,
              char *tag = NULL, unsigned int filter_mask = URL_REMAP_FILTER_NONE);
   mapping_type Remap_redirect(HTTPHdr * request_header, char **redirect_url, char **orig_url, char *tag = NULL);

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc Wed Feb 17 02:26:20 2010
@@ -1326,14 +1326,14 @@
 //      and false on failure
 //    - no-op on WIN32
 bool
-removeRootPriv(void)
+removeRootPriv(uid_t euid)
 {
-  if (seteuid(getuid()) < 0) {
-    Debug("lm", "[restoreRootPiv] seteuid root failed : %s\n", strerror(errno));
+  if (seteuid(euid) < 0) {
+    Debug("lm", "[restoreRootPriv] seteuid failed : %s\n", strerror(errno));
     return false;
   }
 
-  Debug("lm", "[removeRootPiv] removed root privileges.  Euid is %d\n", geteuid());
+  Debug("lm", "[removeRootPriv] removed root privileges.  Euid is %d\n", euid);
 
   return true;
 }
@@ -1345,14 +1345,16 @@
 //      and false on failure
 //    - no-op on WIN32
 bool
-restoreRootPriv(void)
+restoreRootPriv(uid_t *old_euid)
 {
+  if (old_euid)
+    *old_euid = geteuid();
   if (seteuid(0) < 0) {
-    Debug("lm", "[restoreRootPiv] seteuid root failed : %s\n", strerror(errno));
+    Debug("lm", "[restoreRootPriv] seteuid root failed : %s\n", strerror(errno));
     return false;
   }
 
-  Debug("lm", "[restoreRootPiv] restored root privileges.  Euid is %d\n", geteuid());
+  Debug("lm", "[restoreRootPriv] restored root privileges.  Euid is %d\n", 0);
 
   return true;
 }
@@ -1370,9 +1372,10 @@
   int proxy_port_fd = -1;
   bool privBoost = false;
   uid_t euid = geteuid();
+  uid_t saved_euid = 0;
 
   if (proxy_port < 1024 && euid != 0) {
-    if (restoreRootPriv() == false) {
+    if (restoreRootPriv(&saved_euid) == false) {
       mgmt_elog(stderr, "[bindProxyPort] Unable to get root priviledges to bind port %d. euid is %d.  Exiting\n",
                 proxy_port, euid);
       _exit(0);
@@ -1404,7 +1407,7 @@
   Debug("lm", "[bindProxyPort] Successfully bound proxy port %d\n", proxy_port);
 
   if (privBoost == true) {
-    if (removeRootPriv() == false) {
+    if (removeRootPriv(saved_euid) == false) {
       mgmt_elog(stderr, "[bindProxyPort] Unable to reset permissions to euid %d.  Exiting...\n", getuid());
       _exit(1);
     }

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.h?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.h Wed Feb 17 02:26:20 2010
@@ -193,8 +193,8 @@
 
 };                              /* End class LocalManager */
 
-bool restoreRootPriv(void);
-bool removeRootPriv(void);
+bool restoreRootPriv(uid_t *old_euid = NULL);
+bool removeRootPriv(uid_t euid);
 
 
 #endif /* _LOCAL_MANAGER_H */

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/RecordsConfig.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/RecordsConfig.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/RecordsConfig.cc Wed Feb 17 02:26:20 2010
@@ -330,7 +330,7 @@
    RA_NULL}
   ,
   // overseer_mode: 0 disabled, 1 monitor only (get), 2 full acces (get, set, reread, bounce, restart)
-  {CONFIG, "proxy.config.admin.overseer_mode", "", INK_INT, "1", RU_RESTART_TM, RR_NULL, RC_INT, "[0-2]", RA_NULL}
+  {CONFIG, "proxy.config.admin.overseer_mode", "", INK_INT, "0", RU_RESTART_TM, RR_NULL, RC_INT, "[0-2]", RA_NULL}
   ,
   {CONFIG, "proxy.config.admin.overseer_port", "", INK_INT, "9898", RU_NULL, RR_REQUIRED, RC_NULL, NULL,
    RA_NULL}
@@ -582,7 +582,7 @@
   {CONFIG, "proxy.config.proxy.authenticate.basic.realm", "",
    INK_STRING, NULL, RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
-  {CONFIG, "proxy.config.auth.convert_filter_to_policy", "", INK_INT, "1", RU_RESTART_TS, RR_NULL, RC_INT, "[0-1]",
+  {CONFIG, "proxy.config.auth.convert_filter_to_policy", "", INK_INT, "0", RU_RESTART_TS, RR_NULL, RC_INT, "[0-1]",
    RA_NULL}
   ,
   // assumes executable is stored in bin_path directory
@@ -3619,13 +3619,13 @@
   //#
   //# Remote Access Framework (RAF) config - (for integration into SF test harness)
   //#
-  //# ** TM raf is enabled by default with port 20098 (see am-1/tcl/common/defaults.tcl)
+  //# ** TM raf is *NOW* disabled by default with port 20098 (see am-1/tcl/common/defaults.tcl)
   //##############################################################################
   {CONFIG, "proxy.config.raf.enabled", "", INK_INT, "0", RU_RESTART_TS, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
   {CONFIG, "proxy.config.raf.port", "", INK_INT, "0", RU_RESTART_TS, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
-  {CONFIG, "proxy.config.raf.manager.enabled", "", INK_INT, "1", RU_RESTART_TS, RR_NULL, RC_NULL, NULL, RA_NULL}
+  {CONFIG, "proxy.config.raf.manager.enabled", "", INK_INT, "0", RU_RESTART_TS, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,
   {CONFIG, "proxy.config.raf.manager.port", "", INK_INT, "20098", RU_RESTART_TS, RR_NULL, RC_NULL, NULL, RA_NULL}
   ,

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Rollback.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Rollback.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Rollback.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Rollback.cc Wed Feb 17 02:26:20 2010
@@ -306,19 +306,20 @@
 {
   char *filePath;
   int statResult;
+  uid_t saved_euid = 0;
 
   if (version == this->currentVersion) {
     version = ACTIVE_VERSION;
   }
   filePath = createPathStr(version);
   if (root_access_needed) {
-    if (restoreRootPriv() != true) {
+    if (restoreRootPriv(&saved_euid) != true) {
       mgmt_log(stderr, "[Rollback] Unable to acquire root privileges.\n");
     }
   }
   statResult = stat(filePath, buf);
   if (root_access_needed) {
-    if (removeRootPriv() != true) {
+    if (removeRootPriv(saved_euid) != true) {
       mgmt_log(stderr, "[Rollback] Unable to restore non-root privileges.\n");
     }
   }
@@ -337,17 +338,18 @@
 {
   char *filePath;
   int fd;
+  uid_t saved_euid = 0;
 
   filePath = createPathStr(version);
 
   if (root_access_needed) {
-    if (restoreRootPriv() != true) {
+    if (restoreRootPriv(&saved_euid) != true) {
       mgmt_log(stderr, "[Rollback] Unable to acquire root privileges.\n");
     }
   }
   fd = mgmt_open_mode(filePath, oflags, 0644);
   if (root_access_needed) {
-    if (removeRootPriv() != true) {
+    if (removeRootPriv(saved_euid) != true) {
       mgmt_log(stderr, "[Rollback] Unable to restore non-root privileges.\n");
     }
   }

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cop/TrafficCop.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cop/TrafficCop.cc Wed Feb 17 02:26:20 2010
@@ -92,9 +92,9 @@
 static char log_file[PATH_MAX] = "logs/traffic.out";
 static char bin_path[PATH_MAX] = "bin";
 
-static int autoconf_port = 8013;
-static int rs_port = 8018;
-static int http_backdoor_port = 8080;
+static int autoconf_port = 8083;
+static int rs_port = 8088;
+static int http_backdoor_port = 8084;
 static char http_backdoor_ip[PATH_MAX];
 
 static int manager_failures = 0;
@@ -1566,7 +1566,7 @@
   return test_http_port(http_backdoor_port, request, server_timeout * 1000, ip, ip);
 }
 
-#ifndef OEM_NO_WEBUI
+#ifndef NO_WEBUI
 static int
 test_manager_http_port()
 {
@@ -1609,7 +1609,7 @@
 #endif
     return err;
   }
-#ifndef OEM_NO_WEBUI
+#ifndef NO_WEBUI
   start = milliseconds();
   err = test_manager_http_port();
 //     fprintf (stderr, "heartbeat_manager[http]() [%d ms]\n",
@@ -1634,7 +1634,7 @@
     manager_failures = 0;
   }
 
-#endif //OEM_NO_WEBUI
+#endif //NO_WEBUI
 
 #ifdef TRACE_LOG_COP
   cop_log(COP_DEBUG, "Leaving heartbeat_manager() --> %d\n", err);

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/Makefile.am?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/Makefile.am (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/Makefile.am Wed Feb 17 02:26:20 2010
@@ -16,3 +16,34 @@
 
 sysconfdir = $(pkgsysconfdir)
 dist_sysconf_DATA = english.dict
+
+SUBDIRS = agent-installer charting configure images include monitor mrtg tune
+
+install-exec-local:
+	$(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkgdatadir) \
+	$(DESTDIR)$(pkgdatadir)/agent-installer \
+	$(DESTDIR)$(pkgdatadir)/charting \
+	$(DESTDIR)$(pkgdatadir)/configure \
+	$(DESTDIR)$(pkgdatadir)/configure/helper \
+	$(DESTDIR)$(pkgdatadir)/images \
+	$(DESTDIR)$(pkgdatadir)/include \
+	$(DESTDIR)$(pkgdatadir)/monitor \
+	$(DESTDIR)$(pkgdatadir)/mrtg \
+	$(DESTDIR)$(pkgdatadir)/tune
+
+uninstall-local:
+	-rm -rf $(DESTDIR)$(pkgdatadir)
+
+webuidir = $(pkgdatadir)
+dist_webui_DATA = \
+	checkCookies.ink \
+	enableCookies.ink \
+	index.ink \
+	inktomi.css \
+	inktomiLarge.css \
+	navigation_tree.xml \
+	plugin.ink \
+	rename.ink \
+	resize.js \
+	restart.ink \
+	ssl_redirect.ink
\ No newline at end of file

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/mrtg/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/mrtg/Makefile.am?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/mrtg/Makefile.am (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/mrtg/Makefile.am Wed Feb 17 02:26:20 2010
@@ -14,4 +14,7 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-dist_DATA = detailed.ink overview.ink
+webuidir = $(pkgdatadir)/mrtg
+dist_webui_DATA = \
+	detailed.ink \
+	overview.ink
\ No newline at end of file

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/navigation_tree.xml
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/navigation_tree.xml?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/navigation_tree.xml (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/navigation_tree.xml Wed Feb 17 02:26:20 2010
@@ -1,4 +1,5 @@
-<!-------------------------------------------------------------------------
+<?xml version="1.0"?>
+<!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
@@ -14,9 +15,7 @@
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-  ------------------------------------------------------------------------->
-<?xml version="1.0"?>
-
+-->
 <!DOCTYPE MENU_TREE
   [
   <!ELEMENT MENU_TREE (MODE+)>
@@ -391,6 +390,7 @@
         <LINK name="Proxy Access" refresh="false"
               file_link="/configure/c_proxy_access.ink"
               help_link="/help/ts.ink?help=c_cnct.htm"/>
+      </ITEM>
       <ITEM name="Access Control">
         <LINK name="Filtering" refresh="false"
               file_link="/configure/c_http_filtering.ink"

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/tune/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/tune/Makefile.am?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/tune/Makefile.am (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/html2/tune/Makefile.am Wed Feb 17 02:26:20 2010
@@ -16,6 +16,10 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+webuidir = $(pkgdatadir)/tune
+dist_webui_DATA = \
+	navigation_tree.xmlcpp
+
 DEFS += @DEFS@
 
 noinst_DATA = navigation_tree.xml

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/utils/WebMgmtUtils.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/utils/WebMgmtUtils.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/utils/WebMgmtUtils.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/utils/WebMgmtUtils.cc Wed Feb 17 02:26:20 2010
@@ -1572,6 +1572,7 @@
   long total;
   bool cutoff;
   char *too_large_msg = "\nfile too large, truncated here...";
+  uid_t saved_euid = 0;
 
   if (pipe(stdinPipe) == -1)
     mgmt_elog(stderr, "[processSpawn] unable to create stdin pipe\n");
@@ -1593,7 +1594,7 @@
     }
     // set uid to be the effective uid if it's run as root
     if (run_as_root) {
-      restoreRootPriv();
+      restoreRootPriv(&saved_euid);
       if (setuid(geteuid()) == -1) {
         mgmt_elog(stderr, "[processSpawn] unable to set uid to euid");
       }
@@ -1684,7 +1685,7 @@
   }
 
   if (run_as_root) {
-    removeRootPriv();
+    removeRootPriv(saved_euid);
   }
 #endif // _WIN32
   return status;

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebHttpTree.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebHttpTree.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebHttpTree.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebHttpTree.cc Wed Feb 17 02:26:20 2010
@@ -488,8 +488,8 @@
     goto Lerror;
   }
   if (XML_Parse(parser, xml_file_buf, xml_file_len, true) == 0) {
-    mgmt_elog(stderr, "[WebHttpTreeInit]: XML parse error - %s at line %d\n",
-              XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
+    mgmt_elog(stderr, "[WebHttpTreeInit]: XML parse error - %s at line %d for %s\n",
+              XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser),xml_file_path);
     goto Lerror;
   }
   // build javascript tree and track 'item's in our g_link_ht

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebIntrMain.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebIntrMain.cc?rev=910802&r1=910801&r2=910802&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebIntrMain.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/web2/WebIntrMain.cc Wed Feb 17 02:26:20 2010
@@ -618,8 +618,9 @@
   sigset_t allSigs;             // Set of all signals
 #endif
   char *cliPath = NULL;         // UNIX: socket path for cli
-
+#ifndef NO_WEBUI
   char webFailMsg[] = "Management Web Services Failed to Initialize";
+#endif
   char pacFailMsg[] = "Auto-Configuration Service Failed to Initialize";
   //  char gphFailMsg[] = "Dynamic Graph Service Failed to Initialize";
   char cliFailMsg[] = "Command Line Interface Failed to Initialize";
@@ -632,8 +633,9 @@
 
   int addrLen;
   int i;
+#ifndef NO_WEBUI
   int sleepTime = 2;
-
+#endif
   // No Warning
   x = x;
 
@@ -727,7 +729,7 @@
   int rec_err;
   rec_err = RecGetRecordInt("proxy.config.admin.overseer_mode", &tempInt);
   overseerMode = (int) tempInt;
-  if ((rec_err != REC_ERR_OKAY) || overseerMode<1 || overseerMode> 2)
+  if ((rec_err != REC_ERR_OKAY) || overseerMode<0 || overseerMode> 2)
     overseerMode = 2;
   rec_err = RecGetRecordInt("proxy.config.admin.overseer_port", &tempInt);
   overseerPort = (int) tempInt;
@@ -740,7 +742,7 @@
 
   adminContext.SSL_Context = NULL;
 
-#ifndef OEM_NO_WEBUI
+#ifndef NO_WEBUI
   // configure components
   configAuthEnabled();
   configAuthAdminUser();
@@ -749,7 +751,7 @@
   // <@record> substitution requires WebHttpInit() first
   // configLangDict();
   configUI();
-#endif /* OEM_NO_WEBUI */
+#endif /* NO_WEBUI */
 
 #ifdef HAVE_LIBSSL
   configSSLenable();
@@ -877,7 +879,7 @@
   // Check our web contexts to make sure everything is
   //  OK.  If it is, go ahead and fire up the interfaces
 
-#ifndef OEM_NO_WEBUI
+#ifndef NO_WEBUI
 
   if (checkWebContext(&adminContext, "Web Management") != 0) {
     lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_WEB_ERROR, webFailMsg);
@@ -899,7 +901,7 @@
     }
   }
 
-#endif //OEM_NO_WEBUI
+#endif //NO_WEBUI
 
   if (checkWebContext(&autoconfContext, "Browser Auto-Configuration") != 0) {
     lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_WEB_ERROR, pacFailMsg);
@@ -949,11 +951,12 @@
       overseerFD = -1;
     }
   }
+
   // Initialze WebHttp Module
   WebHttpInit();
-#ifndef OEM_NO_WEBUI
+#ifndef NO_WEBUI
   configLangDict();
-#endif /* OEM_NO_WEBUI */
+#endif /* NO_WEBUI */
 
   while (1) {
 
@@ -1047,12 +1050,12 @@
       // Accept OK
       ink_mutex_acquire(&wGlobals.serviceThrLock);
 
-#ifndef OEM_NO_WEBUI
+#ifndef NO_WEBUI
       // Check to see if there are any unprocessed config changes
       if (webConfigChanged > 0) {
         updateWebConfig();
       }
-#endif /* OEM_NO_WEBUI */
+#endif /* NO_WEBUI */
 
       // If this a web manager or an overseer connection, make sure that
       //   it is from an allowed ip addr



Mime
View raw message