[CalendarServer-changes] [11516] CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/ twistedcaldav/scheduling/ischedule/utils.py

source_changes at macosforge.org source_changes at macosforge.org
Sun Jul 14 11:02:13 PDT 2013


Revision: 11516
          http://trac.calendarserver.org//changeset/11516
Author:   cdaboo at apple.com
Date:     2013-07-14 11:02:13 -0700 (Sun, 14 Jul 2013)
Log Message:
-----------
Fix a bug in SRV record lookup when empty results are returned (as opposed to DNS error). Also disable SRV lookups
entirely in this branch only.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/scheduling/ischedule/utils.py

Modified: CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/scheduling/ischedule/utils.py
===================================================================
--- CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/scheduling/ischedule/utils.py	2013-07-14 17:37:39 UTC (rev 11515)
+++ CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/scheduling/ischedule/utils.py	2013-07-14 18:02:13 UTC (rev 11516)
@@ -56,6 +56,10 @@
 @inlineCallbacks
 def lookupServerViaSRV(domain, service="_ischedules"):
 
+    # Hard-code disable of SRV lookups in this root only until we decide on a better
+    # way to disable this for non-POD iSchedule.
+    returnValue(None)
+
     _initResolver()
 
     lookup = "%s._tcp.%s" % (service, domain,)
@@ -82,6 +86,8 @@
         servers.append((a.payload.priority, a.payload.weight, str(a.payload.target), a.payload.port))
 
     log.debug("DNS SRV: lookup results: %s\n%s" % (lookup, servers,))
+    if len(servers) == 0:
+        returnValue(None)
 
 
     def _serverCmp(a, b):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130714/7afcbcee/attachment.html>


More information about the calendarserver-changes mailing list