mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 00:34:39 +08:00
obexd: Fix property Size of server transfer
OBJECT_SIZE_DELETE is shall not be consider a valid size.
This commit is contained in:
parent
4017e79914
commit
7c85e85a65
@ -377,7 +377,8 @@ static gboolean transfer_size_exists(const GDBusPropertyTable *property,
|
||||
struct obex_transfer *transfer = data;
|
||||
struct obex_session *session = transfer->session;
|
||||
|
||||
return session->size != OBJECT_SIZE_UNKNOWN;
|
||||
return (session->size != OBJECT_SIZE_UNKNOWN &&
|
||||
session->size != OBJECT_SIZE_DELETE);
|
||||
}
|
||||
|
||||
static gboolean transfer_get_size(const GDBusPropertyTable *property,
|
||||
@ -386,7 +387,8 @@ static gboolean transfer_get_size(const GDBusPropertyTable *property,
|
||||
struct obex_transfer *transfer = data;
|
||||
struct obex_session *session = transfer->session;
|
||||
|
||||
if (session->size == OBJECT_SIZE_UNKNOWN)
|
||||
if (session->size == OBJECT_SIZE_UNKNOWN ||
|
||||
session->size == OBJECT_SIZE_DELETE)
|
||||
return FALSE;
|
||||
|
||||
dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT64, &session->size);
|
||||
|
Loading…
Reference in New Issue
Block a user