Good morning All.
The link below provides a patch to uriEnv.c that does the following:
1. Adds 'debug' and 'disabled' to the get and set properties functions.
2. Removes 'path' from the getAttrInfo list.
This patch as been implemented and tested on NetWare using the get= and set=
commands of /jkstatus, displays correctly in the /jkstatus uri table and
qry= report and updates the configuration file as appropriate. It has not
been tested on Linux or Windows 32 platforms, but does 'borrow' from
existing functionality in other objects.
The "path" was removed from the getAttrInfo list as it not an actual
property of a uri object (check the structure) but on 'get', returns the
same value as 'uri'. This removes a redundant column from the uri runtime
table in /jkstatus.

http://normw.gknw.com/patches/jk_uriEnv.c.diff

Norm
-------------------------------------------------------
--- jk_uriEnv.c.orig 2004-04-04 18:45:36.000000000 +1000
+++ jk_uriEnv.c 2004-04-04 19:23:06.000000000 +1000
@@ -182,12 +182,11 @@

 static char *getAttInfo[] =
     { "host", "uri", "group", "context", "inheritGlobals",
-    "match_type",
-    "servlet", "timing", "aliases", "path", NULL
+      "match_type", "servlet", "timing", "aliases", "debug", "disabled",
NULL
 };
 static char *setAttInfo[] =
     { "host", "uri", "group", "context", "inheritGlobals",
-    "servlet", "timing", "alias", "path", NULL
+      "servlet", "timing", "alias", "path", "debug", "disabled", NULL
 };

 static char *matchTypes[] = {
@@ -242,6 +241,12 @@
     else if (strcmp("inheritGlobals", name) == 0) {
         return jk2_env_itoa(env, uriEnv->inherit_globals);
     }
+    else if (strcmp(name, "debug") == 0) {
+        return jk2_env_itoa(env, bean->debug);
+    }
+    else if (strcmp(name, "disabled") == 0) {
+        return jk2_env_itoa(env, bean->disabled);
+    }
     return NULL;
 }

@@ -297,27 +302,30 @@
     else if (strcmp("inheritGlobals", name) == 0) {
         uriEnv->inherit_globals = atoi(val);
     }
-    else {
+    else if (strcmp("worker", name) == 0) {
         /* OLD - DEPRECATED */
-        if (strcmp("worker", name) == 0) {
-            uriEnv->workerName = val;
-            env->l->jkLog(env, env->l, JK_LOG_INFO,
+        uriEnv->workerName = val;
+        env->l->jkLog(env, env->l, JK_LOG_INFO,
                           "uriEnv.setAttribute() the %s directive is
deprecated. Use 'group' instead.\n",
                           name);
-        }
-        else if (strcmp("uri", name) == 0) {
-            jk2_uriEnv_parseName(env, uriEnv, val);
-        }
-        else if (strcmp("name", name) == 0) {
-            jk2_uriEnv_parseName(env, uriEnv, val);
-        }
-        else if (strcmp("vhost", name) == 0) {
-            if (val == NULL)
-                uriEnv->virtual = NULL;
-            else
-                uriEnv->virtual =
-                    uriEnv->pool->pstrdup(env, uriEnv->pool, val);
-        }
+    }
+    else if (strcmp("uri", name) == 0) {
+        jk2_uriEnv_parseName(env, uriEnv, val);
+    }
+    else if (strcmp("name", name) == 0) {
+        jk2_uriEnv_parseName(env, uriEnv, val);
+    }
+    else if (strcmp("vhost", name) == 0) {
+        if (val == NULL)
+            uriEnv->virtual = NULL;
+         else
+            uriEnv->virtual = uriEnv->pool->pstrdup(env, uriEnv->pool,
val);
+    }
+    else if (strcmp(name, "debug") == 0) {
+        mbean->debug = atoi(val);
+    }
+    else if (strcmp(name, "disabled") == 0) {
+        mbean->disabled = atoi(val);
     }
     return JK_OK;
 }

-------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to