/soc/2013/ashmew2/filetransferX: 3af70c8a0657: Sending IQResponse

Ashish Gupta ashmew2 at gmail.com
Wed Jul 31 23:05:18 EDT 2013


Changeset: 3af70c8a06577beb0a4971b9ab214c377232a28d
Author:	 Ashish Gupta <ashmew2 at gmail.com>
Date:	 2013-08-01 08:35 +0530
Branch:	 filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferX/rev/3af70c8a0657

Description:

Sending IQResponse

diffstat:

 libpurple/protocols/jabber/google/google_session.c |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (39 lines):

diff --git a/libpurple/protocols/jabber/google/google_session.c b/libpurple/protocols/jabber/google/google_session.c
--- a/libpurple/protocols/jabber/google/google_session.c
+++ b/libpurple/protocols/jabber/google/google_session.c
@@ -639,6 +639,8 @@ google_session_handle_initiate(JabberStr
 		xmlnode *manifest,*file,*filename,*protocol,*http,*url_source_path,*url_preview_path,*transport;
 		char *filesize;
 		GoogleXferSessionData *IncomingXfer = g_new0(GoogleXferSessionData, 1);
+		JabberIq *ResponseIq;
+		gchar *me = g_strdup_printf("%s@%s/%s",session->js->user->node,session->js->user->domain,session->js->user->resource);
 
 		if( description ) {
 			purple_debug_info("google_session", "\ndescription is not NULL");
@@ -686,6 +688,7 @@ google_session_handle_initiate(JabberStr
 			else
 				purple_debug_info("google_session", "\nTransport is NULL");
 		}
+		
 		/************Call to AcceptGoogleXfer() or something.***************
 		if( 1 ) {
 			char *own_jid = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain, js->user->resource);
@@ -702,7 +705,17 @@ google_session_handle_initiate(JabberStr
 			purple_debug_info("google_session", "init() done on XferSession.\n");
 		}
 		/****************************************************/
-		purple_debug_info("Jabber", "We have received a file request.");
+		purple_debug_info("google_session", "We have received a file request.\n");
+		purple_debug_info("google_session", "<iq id : %s> and value of iq_id parameter : %s\n",xmlnode_get_attrib(sess,"id"),iq_id);
+
+		ResponseIq = jabber_iq_new(js,JABBER_IQ_RESULT);
+		xmlnode_set_attrib(ResponseIq->node, "to", session->remote_jid);
+		jabber_iq_set_id(ResponseIq, xmlnode_get_attrib(sess,"id"));
+		xmlnode_set_attrib(ResponseIq->node, "from", me);
+		purple_debug_info("google_session", "ResponseIq->id : %s\n",ResponseIq->id);
+		jabber_iq_send(ResponseIq);
+
+		purple_debug_info("google_session", "Sent ResponseIq.\n");
 		return TRUE;
 	}
 	return TRUE;	



More information about the Commits mailing list