[CalendarServer-changes] [8644] CalendarServer/trunk/twistedcaldav/notify.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Feb 9 17:39:59 PST 2012
Revision: 8644
http://trac.macosforge.org/projects/calendarserver/changeset/8644
Author: sagen at apple.com
Date: 2012-02-09 17:39:59 -0800 (Thu, 09 Feb 2012)
Log Message:
-----------
Ignore invalid input to internal notification port (well log it at least).
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/notify.py
Modified: CalendarServer/trunk/twistedcaldav/notify.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/notify.py 2012-02-09 23:23:01 UTC (rev 8643)
+++ CalendarServer/trunk/twistedcaldav/notify.py 2012-02-10 01:39:59 UTC (rev 8644)
@@ -35,7 +35,7 @@
from zope.interface import Interface, implements
-from twext.python.log import LoggingMixIn
+from twext.python.log import LoggingMixIn, Logger
from twisted.internet.protocol import ReconnectingClientFactory, ServerFactory
from twisted.internet.ssl import ClientContextFactory
@@ -55,6 +55,8 @@
from twistedcaldav.stdconfig import DEFAULT_CONFIG, DEFAULT_CONFIG_FILE
from twistedcaldav import memcachepool
+log = Logger()
+
__all__ = [
"Coalescer",
"INotifier",
@@ -359,8 +361,13 @@
"""
def lineReceived(self, line):
- op, id = line.strip().split()
- self.factory.coalescer.add(op, id)
+ try:
+ op, id = line.strip().split()
+ self.factory.coalescer.add(op, id)
+ except ValueError:
+ # ignore invalid input
+ log.error("Invalid input received on internal notification port: %s"
+ % (line,))
class InternalNotificationFactory(ServerFactory):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120209/0eaca0bb/attachment.html>
More information about the calendarserver-changes
mailing list