--- a/jingle-filetransfer/filetransfer.c Sun Jul 25 01:42:33 2010 +0200
+++ b/jingle-filetransfer/filetransfer.c Sun Jul 25 02:03:58 2010 +0200
@@ -242,6 +242,8 @@
session_add_app(sess, "file", NS_JINGLE_APP_FT, jft);
g_checksum_free(md5);
g_free(sid);
+
+
}
} else if (!g_strcmp0(args[0], "request")) {
scr_LogPrint(LPRINT_LOGNORM, "Jingle File Transfer: try to request %s!",
--- a/jingle-ibb/ibb.c Sun Jul 25 01:42:33 2010 +0200
+++ b/jingle-ibb/ibb.c Sun Jul 25 02:03:58 2010 +0200
@@ -138,7 +138,7 @@
int jingle_ibb_check_session(gconstpointer data, gconstpointer session)
{
const JingleIBB *ibb1 = data, *ibb2 = session;
- if(!g_strcmp0(ibb1->sid, ibb2->sid) && ibb1->seq > ibb2->seq) {
+ if(!g_strcmp0(ibb1->sid, ibb2->sid) && ibb1->seq == ibb2->seq + 1) {
// TODO: change the seq in the session
return 0;
}
--- a/jingle/jingle.c Sun Jul 25 01:42:33 2010 +0200
+++ b/jingle/jingle.c Sun Jul 25 02:03:58 2010 +0200
@@ -47,6 +47,7 @@
static void jingle_init(void);
static void jingle_uninit(void);
static void lm_insert_jinglecontent(gpointer data, gpointer userdata);
+static void lm_insert_sessioncontent(gpointer data, gpointer userdata);
static LmMessageHandler* jingle_iq_handler = NULL;
@@ -54,6 +55,7 @@
static guint connect_hid = 0;
static guint disconn_hid = 0;
+
/**
* Must be aligned with the values in JingleAction
* for easy acces.
@@ -485,3 +487,17 @@
return sid;
}
+
+void jingle_handle_app(JingleSession *sess, const gchar *name,
+ const gchar *xmlns_app, gconstpointer app,
+ const gchar *to)
+{
+ JingleTransportFuncs *trans = jingle_transport_for_app(xmlns_app, NULL);
+
+ if (trans == NULL)
+ return;
+
+ //session_add_trans(sess, name, xmlns, gconstpointer data);
+
+ jingle_send_session_initiate(sess, to);
+}
--- a/jingle/jingle.h Sun Jul 25 01:42:33 2010 +0200
+++ b/jingle/jingle.h Sun Jul 25 02:03:58 2010 +0200
@@ -139,5 +139,4 @@
gchar *new_sid(void);
-static void lm_insert_sessioncontent(gpointer data, gpointer userdata);
#endif
--- a/jingle/register.c Sun Jul 25 01:42:33 2010 +0200
+++ b/jingle/register.c Sun Jul 25 02:03:58 2010 +0200
@@ -124,7 +124,8 @@
thistransport = (TransportHandlerEntry *) entry->data;
// Look if it's forbidden
- if (g_slist_find_custom(*forbid, thistransport->xmlns, cmp_forbid))
+ if (forbid != NULL &&
+ g_slist_find_custom(*forbid, thistransport->xmlns, cmp_forbid))
continue;
if (thistransport->transtype == requestedtype &&
@@ -133,7 +134,10 @@
besttransport = thistransport;
}
}
- *forbid = g_slist_append(*forbid, besttransport->xmlns);
+
+ if (forbid != NULL)
+ *forbid = g_slist_append(*forbid, besttransport->xmlns);
+
return besttransport->funcs;
}