trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geor...@apache.org
Subject svn commit: r915922 [14/14] - in /incubator/trafficserver/traffic/trunk: ./ install/ iocore/aio/ iocore/block-cache/ iocore/cache/ iocore/cluster/ iocore/dns/ iocore/eventsystem/ iocore/hostdb/ iocore/net/ iocore/utils/ libev/ libev/CVS/ libinktomi++/ ...
Date Wed, 24 Feb 2010 18:48:52 GMT
Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpAuth.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpAuth.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpAuth.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpAuth.cc Wed Feb 24 18:48:42
2010
@@ -28,8 +28,8 @@
  * 
  ****************************************************************************/
 
-#include "ink_platform.h"
 #include "inktomi++.h"
+#include "ink_platform.h"
 #include "ink_base64.h"
 #include "ink_code.h"
 #include "TextBuffer.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.cc Wed Feb 24 18:48:42
2010
@@ -28,6 +28,7 @@
  *
  ****************************************************************************/
 
+#include "ink_config.h"
 #include "WebHttpContext.h"
 
 //-------------------------------------------------------------------------

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpLog.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpLog.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpLog.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpLog.cc Wed Feb 24 18:48:42
2010
@@ -28,6 +28,7 @@
  *
  ****************************************************************************/
 
+#include "ink_config.h"
 #include "ink_platform.h"
 #include "TextBuffer.h"
 #include "Main.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpMessage.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpMessage.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpMessage.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpMessage.cc Wed Feb 24 18:48:42
2010
@@ -21,9 +21,10 @@
   limitations under the License.
  */
 
+#include "ink_config.h"
+#include "ink_platform.h"
 #include "ink_unused.h"    /* MAGIC_EDITING_TAG */
 
-#include "ink_platform.h"
 #include "ink_resource.h"
 #include "ink_string.h"
 #include "InkTime.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc Wed Feb 24 18:48:42
2010
@@ -28,6 +28,7 @@
  * 
  ****************************************************************************/
 
+#include "ink_config.h"
 #include "ink_platform.h"
 
 #include "ink_hash_table.h"
@@ -3567,7 +3568,7 @@
 handle_network(WebHttpContext * whc, char *tag, char *arg)
 {
   int err = WEB_HTTP_ERR_OKAY;
-#if (HOST_OS == linux) || (HOST_OS == sunos)
+#if (HOST_OS == linux) || (HOST_OS == solaris)
   char value[1024];
   char *value_safe, *old_value, *dummy;
   char *pos;
@@ -4012,7 +4013,7 @@
   int file_size;
   char *doc_root_file;
   ink_debug_assert(file != NULL);
-#if (HOST_OS == linux)
+#if (HOST_OS == linux) || (HOST_OS == solaris)
 //Bug 49922, for those .ink files which may meet the root-only system files,  
 //upgrade the uid to root.
   int old_euid;
@@ -4045,7 +4046,7 @@
 
 Ldone:
 
-#if (HOST_OS == linux) || (HOST_OS == sunos)
+#if (HOST_OS == linux) || (HOST_OS == solaris)
   if (change_uid) {
     Config_User_Inktomi(old_euid);
   }

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpSession.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpSession.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpSession.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpSession.cc Wed Feb 24 18:48:42
2010
@@ -28,6 +28,7 @@
  * 
  ****************************************************************************/
 
+#include "ink_config.h"
 #include "ink_platform.h"
 #include "ink_resource.h"
 #include "ink_hash_table.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpTree.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpTree.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpTree.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpTree.cc Wed Feb 24 18:48:42
2010
@@ -29,6 +29,7 @@
  * 
  ****************************************************************************/
 
+#include "ink_config.h"
 #include "ink_platform.h"
 #include "ink_hash_table.h"
 #include "ink_snprintf.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc Wed Feb 24 18:48:42
2010
@@ -29,12 +29,7 @@
  *
  ****************************************************************************/
 
-#include "ink_unused.h" /* MAGIC_EDITING_TAG */
-
-#include "ink_platform.h"
-#include "Compatability.h"
 #include "inktomi++.h"
-#include "ink_atomic.h"
 #include "Main.h"
 #include "BaseRecords.h"
 #include "WebHttp.h"
@@ -400,8 +395,11 @@
 
   serv_addr.sun_family = AF_UNIX;
   ink_strncpy(serv_addr.sun_path, fpath, sizeof(serv_addr.sun_path));
+#if (HOST_OS == darwin) || (HOST_OS == freebsd)
+  servlen = sizeof(struct sockaddr_un);
+#else
   servlen = strlen(serv_addr.sun_path) + sizeof(serv_addr.sun_family);
-
+#endif
   if (setsockopt(socketFD, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) <
0) {
     mgmt_log(stderr, "[newUNIXsocket] Unable to set socket options: %s\n", strerror(errno));
   }
@@ -555,10 +553,14 @@
           // socket will give up
           shutdown(wGlobals.serviceThrArray[i].fd, 0);
 
-#if (HOST_OS != freebsd)
+#if (HOST_OS != freebsd) && (HOST_OS != darwin)
           ink_thread_cancel(wGlobals.serviceThrArray[i].threadId);
 #endif
+#if (HOST_OS == darwin)
+          ink_sem_post(wGlobals.serviceThrCount);
+#else
           ink_sem_post(&wGlobals.serviceThrCount);
+#endif
           ink_atomic_increment((ink32 *) & numServiceThr, -1);
 
           wGlobals.serviceThrArray[i].alreadyShutdown = true;
@@ -571,7 +573,11 @@
     ink_mutex_release(&wGlobals.serviceThrLock);
 
     for (int j = 0; j < numJoined; j++) {
+#if (HOST_OS == darwin)
+      ink_sem_post(wGlobals.serviceThrCount);
+#else
       ink_sem_post(&wGlobals.serviceThrCount);
+#endif
       ink_atomic_increment((ink32 *) & numServiceThr, -1);
     }
 
@@ -650,7 +656,16 @@
   //initFrameBindings();
 
   // Set up the threads management
+#if (HOST_OS == darwin)
+  static int qnum = 0;
+  char sname[NAME_MAX];
+  qnum++;
+  snprintf(sname,NAME_MAX,"%s%d","WebInterfaceMutex",qnum);
+  ink_sem_unlink(sname); // FIXME: remove, semaphore should be properly deleted after usage
+  wGlobals.serviceThrCount = ink_sem_open(sname, O_CREAT | O_EXCL, 0777, MAX_SERVICE_THREADS);
+#else /* !darwin */
   ink_sem_init(&wGlobals.serviceThrCount, MAX_SERVICE_THREADS);
+#endif /* !darwin */
   ink_mutex_init(&wGlobals.serviceThrLock, "Web Interface Mutex");
   wGlobals.serviceThrArray = new serviceThr_t[MAX_SERVICE_THREADS];
   for (i = 0; i < MAX_SERVICE_THREADS; i++) {
@@ -988,8 +1003,11 @@
     } else {
       ink_assert(!"[webIntrMain] Error on mgmt_select()\n");
     }
-
+#if (HOST_OS == darwin)
+    ink_sem_wait(wGlobals.serviceThrCount);
+#else
     ink_sem_wait(&wGlobals.serviceThrCount);
+#endif
     ink_atomic_increment((ink32 *) & numServiceThr, 1);
 
     // INKqa11624 - setup sockaddr struct for unix/tcp socket in different sizes
@@ -1005,7 +1023,11 @@
     // coverity[noescape]
     if ((clientFD = mgmt_accept(acceptFD, (sockaddr *) clientInfo, &addrLen)) < 0)
{
       mgmt_log(stderr, "[WebIntrMain]: %s%s\n", "Accept on incoming connection failed: ",
strerror(errno));
+#if (HOST_OS == darwin)
+      ink_sem_post(wGlobals.serviceThrCount);
+#else
       ink_sem_post(&wGlobals.serviceThrCount);
+#endif
       ink_atomic_increment((ink32 *) & numServiceThr, -1);
     } else {                    // Accept succeeded
 
@@ -1051,7 +1073,11 @@
 #endif
         ) {
         mgmt_log("WARNING: connect by disallowed client %s, closing\n", inet_ntoa(clientInfo->sin_addr));
+#if (HOST_OS == darwin)
+        ink_sem_post(wGlobals.serviceThrCount);
+#else
         ink_sem_post(&wGlobals.serviceThrCount);
+#endif
         ink_atomic_increment((ink32 *) & numServiceThr, -1);
         xfree(clientInfo);
         ink_close_socket(clientFD);
@@ -1077,7 +1103,11 @@
               wGlobals.serviceThrArray[i].threadId = 0;
               wGlobals.serviceThrArray[i].fd = -1;
               ink_close_socket(clientFD);
+#if (HOST_OS == darwin)
+              ink_sem_post(wGlobals.serviceThrCount);
+#else
               ink_sem_post(&wGlobals.serviceThrCount);
+#endif
               ink_atomic_increment((ink32 *) & numServiceThr, -1);
             }
 

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc Wed Feb 24 18:48:42
2010
@@ -28,9 +28,9 @@
  * 
  ****************************************************************************/
 
-#include "ink_unused.h"  /* MAGIC_EDITING_TAG */
-
+#include "ink_config.h"
 #include "ink_platform.h"
+#include "ink_unused.h"  /* MAGIC_EDITING_TAG */
 
 #include "WebOverview.h"
 #include "WebGlobals.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc Wed Feb 24 18:48:42
2010
@@ -23,6 +23,7 @@
 
 /***************************************/
 
+#include "ink_config.h"
 #include "ink_unused.h"  /* MAGIC_EDITING_TAG */
 
 #include "ink_snprintf.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc Wed Feb 24 18:48:42
2010
@@ -21,6 +21,7 @@
   limitations under the License.
  */
 
+#include "ink_config.h"
 #include "ink_unused.h"  /* MAGIC_EDITING_TAG */
 
 #include "ink_assert.h"

Modified: incubator/trafficserver/traffic/trunk/proxy/signals.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/signals.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/signals.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/signals.cc Wed Feb 24 18:48:42 2010
@@ -27,10 +27,10 @@
 
 **************************************************************************/
 
-#include <unistd.h>
 #include "inktomi++.h"
+#include <unistd.h>
 #include "signals.h"
-#include "Config.h"
+#include "ProxyConfig.h"
 #include "P_EventSystem.h"
 #include "StatSystem.h"
 #include "P_Cache.h"
@@ -296,8 +296,13 @@
   //
   if (t) {
     if (t->si_code <= 0) {
+#if (HOST_OS == solaris)
+      snprintf(sig_msg, sizeof(sig_msg), "NOTE: Traffic Server received User Sig %d from
pid: %d uid: %d\n",
+               sig, (int)t->si_pid, t->si_uid);
+#else
       snprintf(sig_msg, sizeof(sig_msg), "NOTE: Traffic Server received User Sig %d from
pid: %d uid: %d\n",
                sig, t->si_pid, t->si_uid);
+#endif
     } else {
       snprintf(sig_msg, sizeof(sig_msg), "NOTE: Traffic Server received Kernel Sig %d, Reason:
%d\n", sig, t->si_code);
     }

Modified: incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.cc Wed Feb 24 18:48:42
2010
@@ -26,7 +26,9 @@
  ***************************************************************************/
 
 #define _c_impl
+#include "ink_config.h"
 #include "CoupledStats.h"
+#include "P_EventSystem.h"
 
 void
 CoupledStatsSnapshot::CommitUpdates()

Modified: incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h Wed Feb 24 18:48:42 2010
@@ -37,7 +37,7 @@
 #include "ink_resource.h"
 #include "ink_assert.h"
 #include "BaseRecords.h"
-#include "Config.h"
+#include "ProxyConfig.h"
 #include "Stats.h"
 
 #ifdef _c_impl

Modified: incubator/trafficserver/traffic/trunk/proxy/stats/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/stats/Makefile.am?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/stats/Makefile.am (original)
+++ incubator/trafficserver/traffic/trunk/proxy/stats/Makefile.am Wed Feb 24 18:48:42 2010
@@ -18,8 +18,8 @@
 
 AM_CPPFLAGS = \
   -I$(top_srcdir)/libinktomi++ \
-  $(iocore_include_dirs) \
   -I$(top_srcdir)/proxy \
+  $(iocore_include_dirs) \
   -I$(top_srcdir)/proxy/mgmt2 \
   -I$(top_srcdir)/proxy/mgmt2/preparse \
   -I$(top_srcdir)/proxy/mgmt2/utils \

Modified: incubator/trafficserver/traffic/trunk/proxy/stats/Stats.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/stats/Stats.cc?rev=915922&r1=915921&r2=915922&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/stats/Stats.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/stats/Stats.cc Wed Feb 24 18:48:42 2010
@@ -24,21 +24,16 @@
 
 
 #define _s_impl
+#include "ink_config.h"
 #include "Stats.h"
-#include "ink_mutex.h"
+#include "P_EventSystem.h"
 
-StatDescriptor
-  StatDescriptor::all_stats[StatDescriptor::MAX_NUM_STATS];
-RecRawStatBlock *
-  StatDescriptor::g_stat_block;
-StatDescriptor
-  G_NULL_STAT;
-volatile int
-  StatDescriptor::top_stat = 0;
-ink_mutex
-  g_flt_mux;
-ink_mutex
-  g_cpl_mux;
+StatDescriptor StatDescriptor::all_stats[StatDescriptor::MAX_NUM_STATS];
+RecRawStatBlock *StatDescriptor::g_stat_block;
+StatDescriptor G_NULL_STAT;
+volatile int StatDescriptor::top_stat = 0;
+ink_mutex g_flt_mux;
+ink_mutex g_cpl_mux;
 
 // Main.cc call-in point
 void
@@ -58,17 +53,14 @@
 
 RecData StatDescriptor::update_value()
 {
-  RecData
-    retv;
+  RecData retv;
 
-  if (m_magic == NULL_VALUE || m_magic == SHALLOW_COPY || m_magic == IN_ERROR) {
+  if (m_magic == NULL_VALUE || m_magic == SHALLOW_COPY || m_magic == IN_ERROR)
     return m_value;;
-  }
 
   ink_release_assert(m_id >= 0 && m_id < MAX_NUM_STATS);
 
-  int
-    rc = REC_ERR_OKAY;
+  int rc = REC_ERR_OKAY;
 
   switch (m_type) {
   case RECD_INT:



Mime
View raw message