httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject [PATCH scoreboard] adding port entry
Date Fri, 15 Mar 2002 03:58:31 GMT
When running port based vhosts we want to see the ports in the 
mod_status's output (or other tools working with scoreboard). Otherwise 
there is no added value in displaying vhosts entry at all.

The following patch adds the port entry to the worker_score struct. And 
I've a patch for mod_status, but will wait first for Jeff to commit my 
previous patch and the post it here.

Index: include/scoreboard.h
===================================================================
RCS file: /home/cvspublic/httpd-2.0/include/scoreboard.h,v
retrieving revision 1.44
diff -u -r1.44 scoreboard.h
--- include/scoreboard.h	13 Mar 2002 20:47:42 -0000	1.44
+++ include/scoreboard.h	15 Mar 2002 03:47:46 -0000
@@ -75,6 +75,7 @@
 #include "apr_thread_proc.h"
 #include "apr_portable.h"
 #include "apr_shm.h"
+#include "apr_network_io.h"
 
 /* Scoreboard file, if there is one */
 #ifndef DEFAULT_SCOREBOARD
@@ -156,6 +157,7 @@
     char client[32];		/* Keep 'em small... */
     char request[64];		/* We just want an idea... */
     char vhost[32];	        /* What virtual host is being accessed? */
+    apr_port_t port;           /* On which port */
 };
 
 typedef struct {
Index: server/scoreboard.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/scoreboard.c,v
retrieving revision 1.62
diff -u -r1.62 scoreboard.c
--- server/scoreboard.c	13 Mar 2002 20:48:00 -0000	1.62
+++ server/scoreboard.c	15 Mar 2002 03:47:46 -0000
@@ -464,6 +464,7 @@
             }
             apr_cpystrn(ws->vhost, r->server->server_hostname,
                         sizeof(ws->vhost));
+            ws->port = r->server->port;
         }
     }
     



_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message