[Telepathy-commits] [telepathy-qt4/master] Oggis-review: We don't allow ReadinessJustCreated->ReadinessClosed.

George Goldberg george.goldberg at collabora.co.uk
Fri Nov 7 05:35:03 PST 2008


---
 TelepathyQt4/cli-channel.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/TelepathyQt4/cli-channel.cpp b/TelepathyQt4/cli-channel.cpp
index dd4d94b..44a003a 100644
--- a/TelepathyQt4/cli-channel.cpp
+++ b/TelepathyQt4/cli-channel.cpp
@@ -328,9 +328,11 @@ struct Channel::Private
     void changeReadiness(Readiness newReadiness)
     {
         Q_ASSERT(newReadiness != readiness);
-        // REVIEWME: Should we allow ReadinessJustCreated->ReadinessClosed?
         switch (readiness) {
             case ReadinessJustCreated:
+                // We don't allow ReadinessClosed to be reached without ReadinessFull
+                // being reached at some point first.
+                Q_ASSERT((newReadiness == ReadinessFull) || (newReadiness == ReadinessDead));
                 break;
             case ReadinessFull:
                 Q_ASSERT((newReadiness == ReadinessDead) || (newReadiness == ReadinessClosed));
-- 
1.5.6.5




More information about the Telepathy-commits mailing list