[empathy] tp_chat_check_if_ready: split the test checking if the TpChat is ready



commit 07e4c25c4a39705b7b6ecaaac6c8e001d611a713
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Nov 11 11:58:55 2009 +0000

    tp_chat_check_if_ready: split the test checking if the TpChat is ready

 libempathy/empathy-tp-chat.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 83faaff..7913615 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -777,10 +777,15 @@ tp_chat_check_if_ready (EmpathyTpChat *chat)
 {
 	EmpathyTpChatPriv *priv = GET_PRIV (chat);
 
-	if (priv->ready || priv->user == NULL ||
-	    (priv->members == NULL && priv->remote_contact == NULL)) {
+	if (priv->ready)
+		return;
+
+	if (priv->user == NULL)
+		return;
+
+	/* We need either the members (room) or the remote contact (private chat) */
+	if (priv->members == NULL && priv->remote_contact == NULL)
 		return;
-	}
 
 	DEBUG ("Ready!");
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]