Update of /var/cvs/src/org/mmbase/module/core
In directory james.mmbase.org:/tmp/cvs-serv32627/src/org/mmbase/module/core

Modified Files:
      Tag: MMBase-1_8
        MMBase.java 
Log Message:
icnorporate LOCALHOST keyword in host parameter


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/core


Index: MMBase.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/core/MMBase.java,v
retrieving revision 1.200.2.9
retrieving revision 1.200.2.10
diff -u -b -r1.200.2.9 -r1.200.2.10
--- MMBase.java 11 Mar 2008 16:49:43 -0000      1.200.2.9
+++ MMBase.java 19 Mar 2008 11:43:14 -0000      1.200.2.10
@@ -46,7 +46,7 @@
  * @author Pierre van Rooden
  * @author Johannes Verelst
  * @author Ernst Bunders
- * @version $Id: MMBase.java,v 1.200.2.9 2008/03/11 16:49:43 michiel Exp $
+ * @version $Id: MMBase.java,v 1.200.2.10 2008/03/19 11:43:14 pierre Exp $
  */
 public class MMBase extends ProcessorModule {
 
@@ -317,9 +317,15 @@
             host        = machineName;
         }
 
-        tmp = getInitParameter("HOST");
-        if (tmp != null && !tmp.equals("")) {
-            host = tmp;
+        String hostParam = getInitParameter("HOST");
+        if (hostParam != null && !hostParam.equals("")) {
+            // try to incorporate the 'original' host (if needed)
+            int pos = hostParam.indexOf("${LOCALHOST}");
+            if (pos != -1) {
+                hostParam =hostParam.substring(0, pos) +
+                    host + hostParam.substring(pos + 12);
+            }
+            host = hostParam;
         }
 
         String machineNameParam = getInitParameter("MACHINENAME");
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to