Author: rjung
Date: Wed Feb 25 18:04:26 2009
New Revision: 747873
URL: http://svn.apache.org/viewvc?rev=747873&view=rev
Log:
Rename new shm struct member from hostname to host
in order to keep the names in sync with ajp
struct members and existing property name.
Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_shm.h
tomcat/connectors/trunk/jk/native/common/jk_status.c
Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL:
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=747873&r1=747872&r2=747873&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Wed Feb 25
18:04:26 2009
@@ -2169,7 +2169,7 @@
jk_ajp_pull(aw, l);
if (aw->addr_sequence != aw->s->addr_sequence) {
aw->addr_sequence = aw->s->addr_sequence;
- aw->host = aw->s->hostname;
+ aw->host = aw->s->host;
aw->port = aw->s->port;
if (!jk_resolve(aw->host, aw->port, &aw->worker_inet_addr,
aw->worker.we->pool, l)) {
@@ -2486,7 +2486,7 @@
"worker %s contact is '%s:%d'",
p->name, p->host, p->port);
/* Copy the contact to shm */
- strncpy(p->s->hostname, p->host, JK_SHM_STR_SIZ);
+ strncpy(p->s->host, p->host, JK_SHM_STR_SIZ);
p->s->port = p->port;
/* Resolve if port > 1024.
*
Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.h
URL:
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_shm.h?rev=747873&r1=747872&r2=747873&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_shm.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_shm.h Wed Feb 25 18:04:26 2009
@@ -78,7 +78,7 @@
struct jk_shm_ajp_worker
{
jk_shm_worker_header_t h;
- char hostname[JK_SHM_STR_SIZ+1];
+ char host[JK_SHM_STR_SIZ+1];
int port;
volatile int addr_sequence;
Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL:
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?rev=747873&r1=747872&r2=747873&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Feb 25 18:04:26
2009
@@ -1598,7 +1598,7 @@
else {
if (aw->s->addr_sequence != aw->s->addr_sequence)
return "unresolved";
- else
+ else
return "invalid";
}
}
@@ -1618,7 +1618,7 @@
jk_printf(s, JK_STATUS_SHOW_MEMBER_CONF_ROW,
aw->name,
status_worker_type(type),
- aw->s->hostname, aw->s->port,
+ aw->s->host, aw->s->port,
dump_ajp_addr(aw, buf),
aw->cache_timeout,
aw->connect_timeout,
@@ -1630,7 +1630,7 @@
else
jk_printf(s, JK_STATUS_SHOW_AJP_CONF_ROW,
status_worker_type(type),
- aw->s->hostname, aw->s->port,
+ aw->s->host, aw->s->port,
dump_ajp_addr(aw, buf),
aw->cache_timeout,
aw->connect_timeout,
@@ -1756,7 +1756,7 @@
jk_print_xml_att_string(s, off+2, "name", ajp_name);
jk_print_xml_att_string(s, off+2, "type",
status_worker_type(aw->worker.type));
}
- jk_print_xml_att_string(s, off+2, "host", aw->s->hostname);
+ jk_print_xml_att_string(s, off+2, "host", aw->s->host);
jk_print_xml_att_int(s, off+2, "port", aw->s->port);
jk_print_xml_att_string(s, off+2, "address", dump_ajp_addr(aw, buf));
jk_print_xml_att_int(s, off+2, "connection_pool_timeout",
aw->cache_timeout);
@@ -1815,7 +1815,7 @@
jk_printf(s, " name=%s", ajp_name);
jk_printf(s, " type=%s", status_worker_type(aw->worker.type));
}
- jk_printf(s, " host=%s", aw->s->hostname);
+ jk_printf(s, " host=%s", aw->s->host);
jk_printf(s, " port=%d", aw->s->port);
jk_printf(s, " address=%s", dump_ajp_addr(aw, buf));
jk_printf(s, " connection_pool_timeout=%d", aw->cache_timeout);
@@ -1871,7 +1871,7 @@
jk_print_prop_att_string(s, w, name, "list", ajp_name);
jk_print_prop_att_string(s, w, ajp_name, "type",
status_worker_type(aw->worker.type));
}
- jk_print_prop_att_string(s, w, ajp_name, "host", aw->s->hostname);
+ jk_print_prop_att_string(s, w, ajp_name, "host", aw->s->host);
jk_print_prop_att_int(s, w, ajp_name, "port", aw->s->port);
jk_print_prop_att_string(s, w, ajp_name, "address", dump_ajp_addr(aw,
buf));
jk_print_prop_att_int(s, w, ajp_name, "connection_pool_timeout",
aw->cache_timeout);
@@ -2662,7 +2662,7 @@
jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_HOST_STR,
":</td><td><input name=\"",
JK_STATUS_ARG_AJP_HOST_STR, "\" type=\"text\" ", NULL);
- jk_printf(s, "value=\"%s\"/></td></tr>\n", aw->s->hostname);
+ jk_printf(s, "value=\"%s\"/></td></tr>\n", aw->s->host);
jk_putv(s, "<tr><td>", JK_STATUS_ARG_AJP_TEXT_PORT_INT,
":</td><td><input name=\"",
JK_STATUS_ARG_AJP_PORT_INT, "\" type=\"text\" ", NULL);
@@ -3175,7 +3175,7 @@
}
if ((rv = status_get_string(p, JK_STATUS_ARG_AJP_HOST_STR,
NULL, &arg, l)) == JK_TRUE) {
- if (strncmp(aw->s->hostname, arg, JK_SHM_STR_SIZ)) {
+ if (strncmp(aw->s->host, arg, JK_SHM_STR_SIZ)) {
jk_log(l, JK_LOG_INFO,
"Status worker '%s' setting 'host' for sub worker '%s' to
'%s'",
w->name, aw->name, arg);
@@ -3200,10 +3200,10 @@
w->name, aw->name, host, port);
}
else {
- strcpy(aw->s->hostname, host);
- aw->port = port;
+ strcpy(aw->s->host, host);
+ aw->port = port;
aw->s->addr_sequence += as;
- aw->host = aw->s->hostname;
+ aw->host = aw->s->host;
aw->addr_sequence = aw->s->addr_sequence;
memcpy(&(aw->worker_inet_addr), &inet_addr, sizeof(inet_addr));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]