Author: jfrederic.clere(a)jboss.com
Date: 2009-01-12 14:03:09 -0500 (Mon, 12 Jan 2009)
New Revision: 2163
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
First basic part of MODCLUSTER-27.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-12 08:46:43 UTC (rev 2162)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-12 19:03:09 UTC (rev 2163)
@@ -28,6 +28,7 @@
#include "apr_strings.h"
#include "apr_lib.h"
+#define CORE_PRIVATE
#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
@@ -1168,6 +1169,17 @@
static int manager_trans(request_rec *r)
{
int ours = 0;
+ core_dir_config *conf =
+ (core_dir_config *)ap_get_module_config(r->per_dir_config,
+ &core_module);
+
+ if (conf && conf->handler && r->method_number == M_GET
&&
+ strcmp(conf->handler, "mod_cluster-manager") == 0) {
+ r->handler = "mod_cluster-manager";
+ r->filename = apr_pstrdup(r->pool, r->uri);
+ return OK;
+ }
+
if (strcasecmp(r->method, "CONFIG") == 0)
ours = 1;
else if (strcasecmp(r->method, "ENABLE-APP") == 0)
@@ -1209,6 +1221,14 @@
apr_size_t bufsiz=MAXMESSSIZE;
apr_status_t status;
+ if (strcmp(r->handler, "mod_cluster-manager") == 0) {
+ /* Display the nodes information */
+ if (r->method_number != M_GET)
+ return DECLINED;
+ process_info(r, NULL, NULL);
+ return OK;
+ }
+
if (strcmp(r->handler, "mod-cluster"))
return DECLINED;
Show replies by date