[telepathy-gabble/master] Don't re-set peer & peer_resource in session_parse
Will Thompson
will.thompson at collabora.co.uk
Tue Jun 9 08:36:32 PDT 2009
We now guarantee that these are set at construct time, so there's no
need to set them while parsing the session-initiate.
---
src/jingle-session.c | 19 +------------------
1 files changed, 1 insertions(+), 18 deletions(-)
diff --git a/src/jingle-session.c b/src/jingle-session.c
index 4db456e..33bed50 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -1358,7 +1358,7 @@ gabble_jingle_session_parse (GabbleJingleSession *sess, JingleAction action, LmM
TpHandleRepoIface *contact_repo;
GabbleJingleSessionPrivate *priv = sess->priv;
LmMessageNode *iq_node, *session_node;
- const gchar *from, *resource;
+ const gchar *from;
const gchar *initiator;
iq_node = lm_message_get_node (message);
@@ -1408,14 +1408,6 @@ gabble_jingle_session_parse (GabbleJingleSession *sess, JingleAction action, LmM
return FALSE;
}
- resource = strchr (from, '/');
- if (resource == NULL || *resource == '\0')
- {
- SET_BAD_REQ ("sender with no resource");
- return FALSE;
- }
- resource++;
-
contact_repo = tp_base_connection_get_handles (
(TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT);
@@ -1429,15 +1421,6 @@ gabble_jingle_session_parse (GabbleJingleSession *sess, JingleAction action, LmM
/* if we just created the session, fill in the data */
if (priv->state == JS_STATE_PENDING_CREATED)
{
- sess->peer = tp_handle_ensure (contact_repo, from, NULL, NULL);
-
- if (sess->peer == 0)
- {
- SET_BAD_REQ ("unable to get sender handle");
- return FALSE;
- }
-
- priv->peer_resource = g_strdup (resource);
priv->peer_jid = g_strdup (from);
priv->initiator = g_strdup (initiator);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list