summaryrefslogtreecommitdiff
path: root/obexd/src
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-05-27 20:07:01 -0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-05-28 11:34:26 +0300
commit4c437f5d6a3ef325cb8f490f193646b8a6608afc (patch)
treec9ce6ecbc2a8c20cfb38a57ece04bd8b760c17cd /obexd/src
parent6a4f5ce413f6909f4d9fbb4823da01993f58752c (diff)
downloadbluez-4c437f5d6a3ef325cb8f490f193646b8a6608afc.tar.gz
session: only add Target if it exists
Diffstat (limited to 'obexd/src')
-rw-r--r--obexd/src/manager.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index b67567bc2..b86565c07 100644
--- a/obexd/src/manager.c
+++ b/obexd/src/manager.c
@@ -265,6 +265,14 @@ static DBusMessage *unregister_agent(DBusConnection *conn,
return dbus_message_new_method_return(msg);
}
+static gboolean session_target_exists(const GDBusPropertyTable *property,
+ void *data)
+{
+ struct obex_session *os = data;
+
+ return os->service->target ? TRUE : FALSE;
+}
+
static char *target2str(const uint8_t *t)
{
if (!t)
@@ -521,7 +529,7 @@ static const GDBusPropertyTable transfer_properties[] = {
};
static const GDBusPropertyTable session_properties[] = {
- { "Target", "s", get_target },
+ { "Target", "s", get_target, NULL, session_target_exists },
{ "Root", "s", get_root },
{ }
};