[CalendarServer-changes] [1445] CalendarServer/trunk/twistedcaldav/cluster.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Apr 3 12:49:36 PDT 2007


Revision: 1445
          http://trac.macosforge.org/projects/calendarserver/changeset/1445
Author:   cdaboo at apple.com
Date:     2007-04-03 12:49:36 -0700 (Tue, 03 Apr 2007)

Log Message:
-----------
Use default port values when "bind" ports are not specified.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/cluster.py

Modified: CalendarServer/trunk/twistedcaldav/cluster.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/cluster.py	2007-04-03 18:09:03 UTC (rev 1444)
+++ CalendarServer/trunk/twistedcaldav/cluster.py	2007-04-03 19:49:36 UTC (rev 1445)
@@ -163,14 +163,22 @@
             httpListeners = []
             sslListeners = []
 
-            for ports, listeners in ((config.BindHTTPPorts, httpListeners),
-                                     (config.BindSSLPorts, sslListeners)):
+            httpPorts = config.BindHTTPPorts
+            if not httpPorts:
+                httpPorts = (config.HTTPPort,)
+
+            sslPorts = config.BindSSLPorts
+            if not sslPorts:
+                sslPorts = (config.SSLPort,)
+
+            for ports, listeners in ((httpPorts, httpListeners),
+                                     (sslPorts, sslListeners)):
                 for port in ports:
                     listeners.append(listenTemplate % {
                             'bindAddress': bindAddress,
                             'port': port})
 
-            if config.BindHTTPPorts:
+            if httpPorts:
                 services.append(serviceTemplate % {
                         'name': 'http',
                         'listeningInterfaces': '\n'.join(httpListeners),
@@ -179,7 +187,7 @@
                         'hosts': '\n'.join(hosts)
                         })
 
-            if config.BindSSLPorts:
+            if sslPorts:
                 services.append(serviceTemplate % {
                         'name': 'https',
                         'listeningInterfaces': '\n'.join(sslListeners),

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070403/a0216df8/attachment.html


More information about the calendarserver-changes mailing list