nothing
authorNicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Tue, 10 Aug 2010 01:10:10 +0200
changeset 86 a994dc89a1fc
parent 85 0113d55cada6
child 87 43e7d48f6d84
nothing
jingle/jingle.c
jingle/sessions.c
--- a/jingle/jingle.c	Tue Aug 10 00:31:40 2010 +0200
+++ b/jingle/jingle.c	Tue Aug 10 01:10:10 2010 +0200
@@ -288,18 +288,21 @@
   roster_usr = buddy_search_jid(jid);
   reslist = buddy_getresources(roster_usr->data);
   for (thisres = reslist; thisres; thisres = g_slist_next(thisres)) {
+    choosenres = g_strdup(thisres->data);
+    return choosenres;
     found = TRUE;
     for (indexns = 0; ns[indexns]; indexns++) {
-	  if (!caps_has_feature(buddy_resource_getcaps(roster_usr->data, thisres->data), ns[indexns]))
-	    found = FALSE;
-	}
-	if (!found) continue;
+	   if (!caps_has_feature(buddy_resource_getcaps(roster_usr->data, thisres->data), ns[indexns]))
+	     found = FALSE;
+	 }
+	 if (!found) continue;
 
     choosenres = g_strdup(thisres->data);
     g_slist_foreach(reslist, (GFunc)g_free, NULL);
     g_slist_free(reslist);
     return choosenres;
   }
+  return NULL;
 }
 
 /**
--- a/jingle/sessions.c	Tue Aug 10 00:31:40 2010 +0200
+++ b/jingle/sessions.c	Tue Aug 10 01:10:10 2010 +0200
@@ -24,7 +24,7 @@
 #include <jingle/jingle.h>
 #include <jingle/sessions.h>
 #include <jingle/register.h>
-
+#include <mcabber/logprint.h>
 
 static GSList *sessions;
 
@@ -206,8 +206,10 @@
 {
   JingleTransportFuncs *trans = jingle_transport_for_app(xmlns_app, NULL);
   
-  if (trans == NULL)
+  if (trans == NULL) {
+    scr_LogPrint(LPRINT_LOGNORM, "Unable to find a transport for %s", xmlns_app);
     return;
+  }
   
   session_add_trans(sess, name, trans->xmlns(), trans->new());