--- a/jingle-filetransfer/filetransfer.c Sat Aug 14 19:06:27 2010 +0200
+++ b/jingle-filetransfer/filetransfer.c Sat Aug 14 19:21:42 2010 +0200
@@ -278,7 +278,6 @@
jft->desc = g_strdup(args[0]);
jft->type = JINGLE_FT_OFFER;
jft->name = g_path_get_basename(filename);
- // TODO: Transform date to a good format (ios8601)
jft->date = fileinfo.st_mtime;
jft->size = fileinfo.st_size;
jft->outfile = g_io_channel_new_file (filename, "r", NULL);
@@ -304,6 +303,7 @@
{
JingleFT *jft = (JingleFT*) data;
gchar *size = NULL;
+ gchar date[19];
if (lm_message_node_get_child(node, "description") != NULL)
return;
@@ -326,6 +326,10 @@
if (jft->hash != NULL)
lm_message_node_set_attribute(node2, "hash", jft->hash);
+ if (jft->date)
+ if (!to_iso8601(date, jft->date))
+ lm_message_node_set_attribute(node2, "date", date);
+
if (jft->desc != NULL)
lm_message_node_add_child(node2, "desc", jft->desc);
--- a/jingle-ibb/ibb.c Sat Aug 14 19:06:27 2010 +0200
+++ b/jingle-ibb/ibb.c Sat Aug 14 19:21:42 2010 +0200
@@ -135,7 +135,7 @@
jingle_ack_iq(message);
- jibb->sid = lm_message_node_get_attribute(dnode, "sid");
+ jibb->sid = g_strdup(lm_message_node_get_attribute(dnode, "sid"));
jibb->seq = g_ascii_strtoll(lm_message_node_get_attribute(dnode, "seq"), NULL, 10);
data64 = lm_message_node_get_value(dnode);
--- a/jingle-socks5/socks5.c Sat Aug 14 19:06:27 2010 +0200
+++ b/jingle-socks5/socks5.c Sat Aug 14 19:21:42 2010 +0200
@@ -110,7 +110,7 @@
js5b = g_new0(JingleSocks5, 1);
modestr = lm_message_node_get_attribute(node, "mode");
js5b->mode = index_in_array(modestr, jingle_s5b_modes);
- js5b->sid = lm_message_node_get_attribute(node, "sid");
+ js5b->sid = g_strdup(lm_message_node_get_attribute(node, "sid"));
if (!js5b->sid) {
g_set_error(err, JINGLE_CHECK_ERROR, JINGLE_CHECK_ERROR_MISSING,
@@ -123,9 +123,9 @@
if (!g_strcmp0(node->name, "candidate")) {
const gchar *portstr, *prioritystr, *typestr;
JingleS5BCandidate *jc = g_new0(JingleS5BCandidate, 1);
- jc->cid = lm_message_node_get_attribute(node2, "cid");
- jc->host = lm_message_node_get_attribute(node2, "host");
- jc->jid = lm_message_node_get_attribute(node2, "jid");
+ jc->cid = g_strdup(lm_message_node_get_attribute(node2, "cid"));
+ jc->host = g_strdup(lm_message_node_get_attribute(node2, "host"));
+ jc->jid = g_strdup(lm_message_node_get_attribute(node2, "jid"));
portstr = lm_message_node_get_attribute(node2, "port");
prioritystr = lm_message_node_get_attribute(node2, "priority");
typestr = lm_message_node_get_attribute(node2, "type");