jingle/register.c
changeset 76 42b487daee7d
parent 72 277778138b4b
child 127 02dde03e219b
equal deleted inserted replaced
75:bd48c89b0a3d 76:42b487daee7d
   110  */
   110  */
   111 JingleTransportFuncs *jingle_transport_for_app(const gchar *appxmlns, GSList **forbid)
   111 JingleTransportFuncs *jingle_transport_for_app(const gchar *appxmlns, GSList **forbid)
   112 {
   112 {
   113   AppHandlerEntry *app = jingle_find_app(appxmlns);
   113   AppHandlerEntry *app = jingle_find_app(appxmlns);
   114   GSList *entry;
   114   GSList *entry;
   115   TransportHandlerEntry *thistransport, *besttransport;
   115   TransportHandlerEntry *thistransport, *besttransport = NULL;
   116   JingleTransportPriority bestprio;
   116   JingleTransportPriority bestprio = JINGLE_TRANSPORT_NONE;
   117   JingleTransportType requestedtype;
   117   JingleTransportType requestedtype;
   118 
   118 
   119   if (entry == NULL)
   119   if (entry == NULL)
   120     return NULL;
   120     return NULL;
   121 
   121 
   136   }
   136   }
   137   
   137   
   138   if (forbid != NULL)
   138   if (forbid != NULL)
   139     *forbid = g_slist_append(*forbid, besttransport->xmlns);
   139     *forbid = g_slist_append(*forbid, besttransport->xmlns);
   140   
   140   
   141   return besttransport->funcs;
   141   return besttransport != NULL?besttransport->funcs:NULL;
   142 }
   142 }
   143 
   143 
   144 /**
   144 /**
   145  * This function should work with AppHandlerEntry and
   145  * This function should work with AppHandlerEntry and
   146  * TransportHandlerEntry as long as both start with xmlns.
   146  * TransportHandlerEntry as long as both start with xmlns.