http://bugs.meego.com/show_bug.cgi?id=7766
pohly <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from pohly <[email protected]> 2010-09-30 05:54:07 PDT --- commit e6af21a1cb1e43009edd22be921cd45b2e42bb8a Author: Patrick Ohly <[email protected]> Date: Thu Sep 30 14:27:02 2010 +0200 ... This patch introduces a new state for sessions: - session completed and no longer active - not listed anymore by Server.GetSessions() - read-only methods can still be called for at least a minute "At least" is intentionally a bit fuzzy. The way how it is implemented it may happen that it remains accessible longer, but clients cannot count on it. The main idea behind the patch is that Client::detach() detects when removing a session from a client's resources would delete the session. At that point it triggers the normal cleanup for the session (new Session::done(), same as previous Session::~Session()) and creates a Timeout callback which holds a reference to the Session, thus preventing deletion of it until the timeout fires once and then gets removed together with the session. If a client becomes the sole owner of a session before detaching, then this will repeat. This is considered acceptable and covered by the new semantic ("at least a minute"). The patch is slightly larger than it needs to be because some code was moved around. The Client class now needs access to DBusServer and thus its implementation can no longer be defined inline. TestDBusSession.testAttachOldSession covers that such a completed session can be attached to again. It failed before the delayed deletion was implemented, now it passes. It also verifies that Attach() keeps the session around. TestDBusSession.testExpireSession verifies that the session is really removed after a minute. -- Configure bugmail: http://bugs.meego.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching someone on the CC list of the bug. _______________________________________________ Syncevolution-issues mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution-issues
