[telepathy-gabble/master] gabble_file_transfer_channel_offer_file: send date in FT offer

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Apr 3 09:26:10 PDT 2009


---
 src/file-transfer-channel.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/file-transfer-channel.c b/src/file-transfer-channel.c
index fa9d6f9..3608e5e 100644
--- a/src/file-transfer-channel.c
+++ b/src/file-transfer-channel.c
@@ -1131,6 +1131,20 @@ gabble_file_transfer_channel_offer_file (GabbleFileTransferChannel *self,
   if (self->priv->content_hash != NULL)
     lm_message_node_set_attribute (file_node, "hash", self->priv->content_hash);
 
+  if (self->priv->date != 0)
+    {
+      time_t t;
+      struct tm *tm;
+      char date_str[21];
+
+      t = (time_t) self->priv->date;
+      tm = gmtime (&t);
+
+      strftime (date_str, sizeof (date_str), "%FT%H:%M:%SZ", tm);
+
+      lm_message_node_set_attribute (file_node, "date", date_str);
+    }
+
   /* TODO: support initial offset */
 
   desc_node = lm_message_node_add_child (file_node, "desc",
-- 
1.5.6.5




More information about the telepathy-commits mailing list