[CalendarServer-changes] [9804] CalendarServer/trunk/twistedcaldav/scheduling

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 11 12:23:49 PDT 2012


Revision: 9804
          http://trac.macosforge.org/projects/calendarserver/changeset/9804
Author:   sagen at apple.com
Date:     2012-09-11 12:23:47 -0700 (Tue, 11 Sep 2012)
Log Message:
-----------
Suppress iMIP+VFREEBUSY error log messages -- that combination is not supported

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/scheduling/imip.py
    CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py

Modified: CalendarServer/trunk/twistedcaldav/scheduling/imip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/imip.py	2012-09-11 17:21:15 UTC (rev 9803)
+++ CalendarServer/trunk/twistedcaldav/scheduling/imip.py	2012-09-11 19:23:47 UTC (rev 9804)
@@ -62,7 +62,8 @@
             self.responses.add(
                 recipient.cuaddr,
                 Failure(exc_value=err),
-                reqstatus=iTIPRequestStatus.SERVICE_UNAVAILABLE
+                reqstatus=iTIPRequestStatus.SERVICE_UNAVAILABLE,
+                suppressErrorLog=True
             )
         
         # Generate an HTTP client request

Modified: CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py	2012-09-11 17:21:15 UTC (rev 9803)
+++ CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py	2012-09-11 19:23:47 UTC (rev 9804)
@@ -1278,13 +1278,16 @@
         """
         self.location = location
 
-    def add(self, recipient, what, reqstatus=None, calendar=None):
+    def add(self, recipient, what, reqstatus=None, calendar=None, suppressErrorLog=False):
         """
         Add a response.
         @param recipient: the recipient for this response.
         @param what: a status code or a L{Failure} for the given recipient.
         @param status: the iTIP request-status for the given recipient.
         @param calendar: the calendar data for the given recipient response.
+        @param suppressErrorLog: whether to suppress a log message for errors; primarily
+            this is used when trying to process a VFREEBUSY over iMIP, which isn't
+            supported.
         """
         if type(what) is int:
             code    = what
@@ -1297,7 +1300,7 @@
         else:
             raise AssertionError("Unknown data type: %r" % (what,))
 
-        if code > 400: # Error codes only
+        if not suppressErrorLog and code > 400: # Error codes only
             self.log_error("Error during %s for %s: %s" % (self.method, recipient, message))
 
         children = []
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120911/4db1d822/attachment.html>


More information about the calendarserver-changes mailing list