[Telepathy-commits] [telepathy-gabble/master] no need to call check_gadget_* when receiving a message stanza
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Sep 26 10:02:53 PDT 2008
20080728155912-7fe3f-80f670c9121d2ea0766f604acaf43ff98694901c.gz
---
src/conn-olpc.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index 15973a1..3aad5db 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -3524,21 +3524,13 @@ conn_olpc_msg_cb (LmMessageHandler *handler,
const gchar *from;
LmMessageNode *node;
- /* FIXME: We call that to be sure conn->olpc_gadget_{buddy,activity} are
- * initialised if the service was discovered.
- * Are we supposed to receive changes notifications message from gadget
- * if we didn't send it a search request before? If not we can assume
- * these check_gadget_* functions were already called and just check if
- * conn->olpc_gadget_{buddy,activity} are not NULL.
- */
- if (!check_gadget_buddy (conn, NULL) && !check_gadget_activity (conn, NULL))
- return LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS;
-
from = lm_message_node_get_attribute (message->node, "from");
if (from == NULL)
return LM_HANDLER_RESULT_REMOVE_MESSAGE;
- /* FIXME: we shouldn't hardcode that */
+ /* If we are receiving notifications from Gadget that means we
+ * previoulsy sent it a view request, so
+ * conn->olpc_gadget_{buddy,activity} have been defined */
if (tp_strdiff (from, conn->olpc_gadget_buddy) &&
tp_strdiff (from, conn->olpc_gadget_activity))
return LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS;
--
1.5.6.5
More information about the Telepathy-commits
mailing list