diff --git a/src/gatt-client.c b/src/gatt-client.c
index 2af6979..57a1f66 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
}
static void async_dbus_op_reply(struct async_dbus_op *op, int err,
- const uint8_t *value, size_t length)
+ const uint8_t *value, ssize_t length)
{
const struct queue_entry *entry;
DBusMessage *reply;
return;
}
- if (value)
+ if (length >= 0)
message_append_byte_array(reply, value, length);
send_reply:
}
done:
- async_dbus_op_reply(op, err, NULL, 0);
+ async_dbus_op_reply(op, err, NULL, -1);
}
static void write_cb(bool success, uint8_t att_ecode, void *user_data)
else
err = att_ecode ? att_ecode : -ENOENT;
- async_dbus_op_reply(op, err, NULL, 0);
+ async_dbus_op_reply(op, err, NULL, -1);
}
static void register_notify_cb(uint16_t att_ecode, void *user_data)