You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2006/11/26 09:59:48 UTC
svn commit: r479313 - in /tomcat/connectors/trunk/jk/native/common:
jk_util.c jk_util.h
Author: rjung
Date: Sun Nov 26 00:59:48 2006
New Revision: 479313
URL: http://svn.apache.org/viewvc?view=rev&rev=479313
Log:
- Remove unused function declaration
- Add new config options, used for the status worker:
- css (this one existed before, but was configured
using the general property mechanism)
- read_only (inhibits changing configs via status worker)
- user (list of users allowed to use status worker,
in case our web server doesn't have pretty auth features,
maybe interesting when used with IIS)
Caution: these are only the config functions.
Implementing the features read_only and user
follows in a later commit.
Modified:
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h
Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=479313&r1=479312&r2=479313
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Nov 26 00:59:48 2006
@@ -76,7 +76,9 @@
#define ACTIVATION_OF_WORKER ("activation")
#define WORKER_RECOVER_TIME ("recover_time")
#define WORKER_MAX_PACKET_SIZE ("max_packet_size")
-
+#define STYLE_SHEET_OF_WORKER ("css")
+#define READ_ONLY_OF_WORKER ("read_only")
+#define USER_OF_WORKER ("user")
#define DEFAULT_WORKER_TYPE JK_AJP13_WORKER_NAME
#define SECRET_KEY_OF_WORKER ("secretkey")
@@ -123,6 +125,7 @@
static const char *list_properties[] = {
BALANCE_WORKERS,
MOUNT_OF_WORKER,
+ USER_OF_WORKER,
"list",
NULL
};
@@ -158,6 +161,8 @@
ACTIVATION_OF_WORKER,
WORKER_RECOVER_TIME,
WORKER_MAX_PACKET_SIZE,
+ STYLE_SHEET_OF_WORKER,
+ READ_ONLY_OF_WORKER,
RETRIES_OF_WORKER,
WORKER_MAINTAIN_PROPERTY_NAME,
NULL
@@ -972,6 +977,55 @@
sz = 64*1024;
return sz;
+}
+
+const char *jk_get_worker_style_sheet(jk_map_t *m, const char *wname, const char *def)
+{
+ char buf[1024];
+
+ if (!m || !wname) {
+ return NULL;
+ }
+
+ MAKE_WORKER_PARAM(STYLE_SHEET_OF_WORKER);
+
+ return jk_map_get_string(m, buf, def);
+}
+
+int jk_get_is_read_only(jk_map_t *m, const char *wname)
+{
+ int rc = JK_FALSE;
+ char buf[1024];
+ if (m && wname) {
+ int value;
+ MAKE_WORKER_PARAM(READ_ONLY_OF_WORKER);
+ value = jk_map_get_bool(m, buf, 0);
+ if (value)
+ rc = JK_TRUE;
+ }
+ return rc;
+}
+
+int jk_get_worker_user_list(jk_map_t *m,
+ const char *wname,
+ char ***list, unsigned int *num_of_users)
+{
+ char buf[1024];
+
+ if (m && list && num_of_users && wname) {
+ char **ar = NULL;
+
+ MAKE_WORKER_PARAM(USER_OF_WORKER);
+ ar = jk_map_get_string_list(m, buf, num_of_users, NULL);
+ if (ar) {
+ *list = ar;
+ return JK_TRUE;
+ }
+ *list = NULL;
+ *num_of_users = 0;
+ }
+
+ return JK_FALSE;
}
int jk_get_lb_worker_list(jk_map_t *m,
Modified: tomcat/connectors/trunk/jk/native/common/jk_util.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.h?view=diff&rev=479313&r1=479312&r2=479313
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.h Sun Nov 26 00:59:48 2006
@@ -98,8 +98,6 @@
int jk_get_worker_activation(jk_map_t *m, const char *wname);
-void jk_set_log_format(const char *logformat);
-
int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_wokers);
int jk_get_lb_factor(jk_map_t *m, const char *wname);
@@ -170,6 +168,14 @@
int jk_get_worker_maintain_time(jk_map_t *m);
int jk_get_max_packet_size(jk_map_t *m, const char *wname);
+
+const char *jk_get_worker_style_sheet(jk_map_t *m, const char *wname, const char *def);
+
+int jk_get_is_read_only(jk_map_t *m, const char *wname);
+
+int jk_get_worker_user_list(jk_map_t *m,
+ const char *wname,
+ char ***list, unsigned int *num_of_users);
#define TC32_BRIDGE_TYPE 32
#define TC33_BRIDGE_TYPE 33
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org