--- a/jingle/register.c Wed Jul 21 01:51:10 2010 +0200
+++ b/jingle/register.c Wed Jul 21 17:19:28 2010 +0200
@@ -100,10 +100,15 @@
return (entry = jingle_find_transport(xmlns)) != NULL ? entry->funcs : NULL;
}
+gint cmp_forbid(gconstpointer a, gconstpointer b)
+{
+ return g_strcmp0((const gchar *)a, (const gchar *)b);
+}
+
/**
* Determine which transport is better suited for a given app.
*/
-JingleTransportFuncs *jingle_transport_for_app(const gchar *appxmlns)
+JingleTransportFuncs *jingle_transport_for_app(const gchar *appxmlns, GSList *forbid)
{
AppHandlerEntry *app = jingle_find_app(appxmlns);
GSList *entry;
@@ -117,6 +122,11 @@
requestedtype = app->transtype;
for (entry = jingle_transport_handlers; entry; entry = entry->next) {
thistransport = (TransportHandlerEntry *) entry->data;
+
+ // Look if it's forbidden
+ if (g_slist_find_custom(forbid, thistransport->xmlns, cmp_forbid))
+ continue;
+
if (thistransport->priority > bestprio) {
bestprio = thistransport->priority;
besttransport = thistransport;