/soc/2013/ashmew2/filetransferX: 0d3178129bb0: Receive <64M file...

Ashish Gupta ashmew2 at gmail.com
Tue Aug 20 19:07:21 EDT 2013


Changeset: 0d3178129bb0327063436537241b2e181a09d0ae
Author:	 Ashish Gupta <ashmew2 at gmail.com>
Date:	 2013-08-21 00:50 +0530
Branch:	 filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferX/rev/0d3178129bb0

Description:

Receive <64M files over a Local Network\!

diffstat:

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

diffs (38 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
@@ -1853,6 +1853,34 @@ void cb_nice_component_state_changed(Nic
 	purple_debug_info("google_session", "__State of NiceAgent Changed...Current State : [%d]%s.Stream ID: %d\n", state, nice_component_state_to_str(state), stream_id);
 
 	if(state == NICE_COMPONENT_STATE_READY) {
+		GSList *remote_candids = nice_agent_get_remote_candidates(agent, stream_id, component_id);
+		GSList *local_candids = nice_agent_get_local_candidates(agent, stream_id, component_id);
+
+		purple_debug_info("google_session", "List of remote candidates : \n********\n");
+
+		while(remote_candids) {
+			gchar *ip = g_malloc(NICE_ADDRESS_STRING_LEN + 1);
+			NiceCandidate *c = (NiceCandidate *)remote_candids->data;
+			nice_address_to_string(&c->addr, ip);
+
+			purple_debug_info("google_session", "IP: %s, Port:%u\n",ip,nice_address_get_port(&c->addr));
+			remote_candids = remote_candids->next;
+		}
+		purple_debug_info("google_session", "***********\n");
+
+		purple_debug_info("google_session", "List of local candidates : \n********\n");
+		while(local_candids) {
+			gchar *ip = g_malloc(NICE_ADDRESS_STRING_LEN + 1);
+			NiceCandidate *c = (NiceCandidate *)local_candids->data;
+			nice_address_to_string(&c->addr, ip);
+
+			purple_debug_info("google_session", "IP: %s, Port:%u\n",ip,nice_address_get_port(&c->addr));
+			local_candids = local_candids->next;
+		}
+		purple_debug_info("google_session", "***********\n");
+	}
+	
+	if(state == NICE_COMPONENT_STATE_READY) {
 	  purple_debug_info("google_session", "READY!\n");
 	  gint send_ret;
 	  JabberStream *js = session->js;



More information about the Commits mailing list