$ ./server-file-transfer usage: /home/robsta/Devel/ytstenut/telepathy-ytstenut-build/telepathy-ytstenut-glib/tests/.libs/lt-server-file-transfer [account name] [contact id] [local service name] [remote service name] [file to send] $ ./server-file-transfer gabble/jabber/ytstenut1_40test_2ecollabora_2eco_2euk0 ytstenut2@test.collabora.co.uk recipient.service.name sender.service.name waiting for a file transfer channel... handling file transfer channel: /org/freedesktop/Telepathy/Connection/gabble/jabber/ytstenut2_40test_2ecollabora_2eco_2euk_2fb332e903/FileTransferChannel/0x8c95be8 from recipient.service.name saving file to: /tmp/test-ft transferred 18 bytes... transfer complete!
Created attachment 56703 [details] [review] 0001-server-file-transfer-print-ServiceName-channel-metad.patch Print the file transfer channel's ServiceName metadata property when receiving a file. This is just a debugging enhancement patch, not a fix.
Comment on attachment 56703 [details] [review] 0001-server-file-transfer-print-ServiceName-channel-metad.patch Review of attachment 56703 [details] [review]: ----------------------------------------------------------------- Seems fine apart from this. ::: telepathy-ytstenut-glib/tests/server-file-transfer.c @@ +238,5 @@ > G_CALLBACK (transferred_bytes_cb), NULL); > > + g_print ("handling file transfer channel: %s from %s\n", > + tp_proxy_get_object_path (chan), > + tp_asv_get_string (props, "org.freedesktop.Telepathy.Channel.Interface.FileTransfer.Metadata.ServiceName")); Use TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_SERVICE_NAME here instead of this static string.
As per Jonny's advice the sender needs to add its own service name to the metadata when requesting the channel. Moving to ytstenut-glib.
(08:54:33 PM) jonnylamb: when you request the channel on the sending side, include the Metadata property. (08:55:42 PM) jonnylamb: so, for example, when creating the GHashTable, add a key with value TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_METADATA jonner jonnylamb (08:56:29 PM) jonnylamb: and create a a{sas} with: GHashTable<gchar*,gchar**> with SenderName={"foo.bar", NULL};
commit df8e6e7904be4f7ea632a956682eeb5471a5a95c Author: Rob Staudinger <robsta@linux.intel.com> Date: Tue Feb 14 10:55:12 2012 +0100 file-transfer: Pass sender service-id in file metadata The sender needs to add its own service-id to the metadata when transferring a file, so the recipient can look up who it is coming from. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45733
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.