# HG changeset patch # User Nicolas Cornu # Date 1281395410 -7200 # Node ID a994dc89a1fcfb7551007460bb6ca1f74ceb90e2 # Parent 0113d55cada6b7e8b380ce8fbdda3df7fd335eb9 nothing diff -r 0113d55cada6 -r a994dc89a1fc jingle/jingle.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; } /** diff -r 0113d55cada6 -r a994dc89a1fc jingle/sessions.c --- 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 #include #include - +#include 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());