/soc/2013/ashmew2/filetransferX: 2f08b9a5223e: Need to Add Relay...

Ashish Gupta ashmew2 at gmail.com
Thu Aug 15 17:45:09 EDT 2013


Changeset: 2f08b9a5223ee06a6bc042b34391d0b28780ef43
Author:	 Ashish Gupta <ashmew2 at gmail.com>
Date:	 2013-08-15 19:08 +0530
Branch:	 filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferX/rev/2f08b9a5223e

Description:

Need to Add Relay Servers

diffstat:

 libpurple/protocols/jabber/google/google_session.c |  19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diffs (52 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
@@ -1052,8 +1052,12 @@ cb_candidate_gathering_done(NiceAgent *a
   NiceAgent *agent = temp->agent;
 */  
 	GList *lcands = nice_agent_get_local_candidates(agent, stream_id, 1);
+	char *local_ufrag, *local_password;
 
-	purple_debug_info("google_session", "CANDIDATES GATHERED??\n");
+	nice_agent_get_local_credentials(agent, stream_id,
+					 &local_ufrag, &local_password);
+
+	purple_debug_info("google_session", "Candidates Gathered. User/Pass : %s/%s",local_ufrag, local_password);
 	
 	if(lcands) {
 		GList *iter = lcands;
@@ -1110,8 +1114,12 @@ cb_candidate_gathering_done(NiceAgent *a
 				purple_debug_info("google_session", "IP and port : %s:%s\n",ip,port);
 				pref = g_strdup_printf("%u",candid->priority);
 
-				username = candid->username;
+/*				username = candid->username;
 				password = candid->password;
+*/
+				username = g_strdup(local_ufrag);
+				password = g_strdup(local_password);
+
 				type = candid->type;
 				purple_debug_info("google_session", "Setting attributes now.. : \n");
 				
@@ -1119,17 +1127,16 @@ cb_candidate_gathering_done(NiceAgent *a
 				xmlnode_set_attrib(candidate, "port", port);
 				xmlnode_set_attrib(candidate, "name", "private-1");
 				
-				
 				purple_debug_info("google_session", "Setting some more attributes now.. : \n");
 				xmlnode_set_attrib(candidate, "username", username != NULL ? username : "");
 				xmlnode_set_attrib(candidate, "password",
 						   password != NULL ? password : "");
 
 				purple_debug_info("google_session", "Setting even more attributes now.. : \n");
-
-				xmlnode_set_attrib(candidate, "preference", pref);
+/*TODO: Fix preference*/
+				xmlnode_set_attrib(candidate, "preference", "0.9");
 				xmlnode_set_attrib(candidate, "protocol", "udp");
-
+/*TODO: ADD RELAY SERVERS ASAP!*/
 				/*CHECK THIS : TODO Type*/
 				purple_debug_info("google_session", "Setting type attrib : \n");
 				xmlnode_set_attrib(candidate, "type", 



More information about the Commits mailing list