[CalendarServer-changes] [11027] CalendarServer/trunk/txdav
source_changes at macosforge.org
source_changes at macosforge.org
Thu Apr 11 06:34:51 PDT 2013
Revision: 11027
http://trac.calendarserver.org//changeset/11027
Author: cdaboo at apple.com
Date: 2013-04-11 06:34:51 -0700 (Thu, 11 Apr 2013)
Log Message:
-----------
Another fix for push on shared collections.
Modified Paths:
--------------
CalendarServer/trunk/txdav/caldav/datastore/test/common.py
CalendarServer/trunk/txdav/common/datastore/sql.py
Modified: CalendarServer/trunk/txdav/caldav/datastore/test/common.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/test/common.py 2013-04-10 21:43:39 UTC (rev 11026)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/common.py 2013-04-11 13:34:51 UTC (rev 11027)
@@ -1123,7 +1123,7 @@
home = yield self.homeUnderTest(name=OTHER_HOME_UID)
self.assertEquals(home.notifierID(), "CalDAV|%s" % (OTHER_HOME_UID,))
calendar = yield home.calendarWithName(self.sharedName)
- self.assertEquals(calendar.notifierID(), "CalDAV|%s" % (OTHER_HOME_UID,))
+ self.assertEquals(calendar.notifierID(), "CalDAV|home1")
self.assertEquals(calendar.notifierID(label="collection"), "CalDAV|home1/calendar_1")
yield self.commit()
Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py 2013-04-10 21:43:39 UTC (rev 11026)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py 2013-04-11 13:34:51 UTC (rev 11027)
@@ -2483,10 +2483,14 @@
self._objectNames = None
self._syncTokenRevision = None
+ # Always use notifiers based off the owner home so that shared collections use tokens common
+ # to the owner - and thus will be the same for each sharee. Without that, each sharee would have
+ # a different token to subscribe to and thus would each need a separate push - whereas a common
+ # token only requires one push (to multiple subscribers).
if self._ownerHome._notifiers:
childID = "%s/%s" % (self._ownerHome.uid(), self._ownerName)
self._notifiers = [notifier.clone(label="collection", id=childID)
- for notifier in home._notifiers]
+ for notifier in self._ownerHome._notifiers]
else:
self._notifiers = None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130411/46883958/attachment.html>
More information about the calendarserver-changes
mailing list