From 7ad750ebc50afa903a2c15b132053135cf04eecd Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 29 Aug 2016 12:02:48 +0300 Subject: [PATCH] core/gatt: Fix passing invalid error code to strerror async_dbus_op_reply posix errors are passed as negative values. --- src/gatt-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gatt-client.c b/src/gatt-client.c index 029a9d1bd..2af6979ac 100644 --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -309,7 +309,7 @@ static void async_dbus_op_reply(struct async_dbus_op *op, int err, if (err) { reply = err > 0 ? create_gatt_dbus_error(msg, err) : - btd_error_failed(msg, strerror(err)); + btd_error_failed(msg, strerror(-err)); goto send_reply; } -- 2.47.3