[PATCH obexd v2 01/15] client: Make transfer filename optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>

The property might not exist for certain transfers, typically when they
have been initiated internally.
---
 client/transfer.c  |    4 +++-
 doc/client-api.txt |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/client/transfer.c b/client/transfer.c
index 14006ef..e7852e1 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -104,7 +104,9 @@ static DBusMessage *obc_transfer_get_properties(DBusConnection *connection,
 
 	obex_dbus_dict_append(&dict, "Name", DBUS_TYPE_STRING, &transfer->name);
 	obex_dbus_dict_append(&dict, "Size", DBUS_TYPE_UINT64, &transfer->size);
-	obex_dbus_dict_append(&dict, "Filename", DBUS_TYPE_STRING,
+
+	if (transfer->filename != NULL)
+		obex_dbus_dict_append(&dict, "Filename", DBUS_TYPE_STRING,
 							&transfer->filename);
 
 	if (transfer->obex != NULL)
diff --git a/doc/client-api.txt b/doc/client-api.txt
index 3c6a2e1..3b5444d 100644
--- a/doc/client-api.txt
+++ b/doc/client-api.txt
@@ -299,7 +299,7 @@ Properties	string Name [readonly]
 			Size of the transferred object. If the size is
 			unknown, then this property will not be present.
 
-		string Filename [readonly]
+		string Filename [readonly, optional]
 
 			Complete name of the file being received or sent.
 
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux