[CalendarServer-changes] [5300] CalendarServer/trunk/twistedcaldav/method/report_common.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 12 13:16:12 PST 2010


Revision: 5300
          http://trac.macosforge.org/projects/calendarserver/changeset/5300
Author:   sagen at apple.com
Date:     2010-03-12 13:16:12 -0800 (Fri, 12 Mar 2010)
Log Message:
-----------
Now checking the free-busy resource limit even for indexed instances.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/report_common.py

Modified: CalendarServer/trunk/twistedcaldav/method/report_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/report_common.py	2010-03-12 20:47:10 UTC (rev 5299)
+++ CalendarServer/trunk/twistedcaldav/method/report_common.py	2010-03-12 21:16:12 UTC (rev 5300)
@@ -478,6 +478,8 @@
 
         # Short-cut - if an fbtype exists we can use that
         if type == "VEVENT" and aggregated_resources[key][0][3] != '?':
+
+            matchedResource = False
             
             # Look at each instance
             for float, start, end, fbtype in aggregated_resources[key]:
@@ -516,7 +518,14 @@
 
                 # Double check for overlap
                 if clipped:
+                    matchedResource = True
                     fbinfo[fbtype_index_mapper.get(fbtype, 0)].append(clipped)
+
+            if matchedResource:
+                # Check size of results is within limit
+                matchtotal += 1
+                if matchtotal > max_number_of_matches:
+                    raise NumberOfMatchesWithinLimits(max_number_of_matches)
                 
         else:
             calendar = calresource.iCalendar(name)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100312/aad355b9/attachment.html>


More information about the calendarserver-changes mailing list