ASF Bugzilla – Attachment 24575 Details for
Bug 48244
Socket Server configuration does not handle not reverse DNS resolvable hosts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Previous patch had some garbage diff info in it
SocketServer-config-hostname-ip.patch (text/plain), 1.23 KB, created by
Mark Farver
on 2009-11-20 12:18:08 UTC
(
hide
)
Description:
Previous patch had some garbage diff info in it
Filename:
MIME Type:
Creator:
Mark Farver
Created:
2009-11-20 12:18:08 UTC
Size:
1.23 KB
patch
obsolete
>diff -ur -w apache-log4j-1.2.15.orig/src/main/java/org/apache/log4j/net/SocketServer.java apache-log4j-1.2.15/src/main/java/org/apache/log4j/net/SocketServer.java >--- apache-log4j-1.2.15.orig/src/main/java/org/apache/log4j/net/SocketServer.java 2007-08-25 00:09:40.000000000 -0400 >+++ apache-log4j-1.2.15/src/main/java/org/apache/log4j/net/SocketServer.java 2009-11-20 14:44:58.022583560 -0500 >@@ -164,16 +164,15 @@ > // yet. It will configure one and return it. > LoggerRepository configureHierarchy(InetAddress inetAddress) { > cat.info("Locating configuration file for "+inetAddress); >- // We assume that the toSting method of InetAddress returns is in >- // the format hostname/d1.d2.d3.d4 e.g. torino/192.168.1.1 >- String s = inetAddress.toString(); >- int i = s.indexOf("/"); >- if(i == -1) { >+ String key = inetAddress.getHostName(); >+ if ( 0 == key.length() ) { >+ key = inetAddress.getHostAddress(); >+ } >+ if ( 0 == key.length() ) { > cat.warn("Could not parse the inetAddress ["+inetAddress+ > "]. Using default hierarchy."); > return genericHierarchy(); > } else { >- String key = s.substring(0, i); > > File configFile = new File(dir, key+CONFIG_FILE_EXT); > if(configFile.exists()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48244
:
24574
| 24575