From: Pali Rohár Date: Thu, 23 Apr 2020 23:34:14 +0000 (+0200) Subject: btio: Fix error number X-Git-Tag: accepted/tizen/unified/20210607.124421~165 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96479f0b19a5d8effde3b9bd68c20c0ee9a77ce7;p=platform%2Fupstream%2Fbluez.git btio: Fix error number In commit d20ee8273e61e16c78582344f274254973cdf00f was unintentionally negated error number. Fix this mistake. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- diff --git a/btio/btio.c b/btio/btio.c index be3784a..2281909 100755 --- a/btio/btio.c +++ b/btio/btio.c @@ -230,7 +230,7 @@ static gboolean connect_cb(GIOChannel *io, GIOCondition cond, if (err < 0) { ba2str(&conn->dst, addr); - g_set_error(&gerr, BT_IO_ERROR, err, + g_set_error(&gerr, BT_IO_ERROR, -err, "connect to %s: %s (%d)", addr, strerror(-err), -err); } @@ -1718,7 +1718,7 @@ GIOChannel *bt_io_connect(BtIOConnect connect, gpointer user_data, if (err < 0) { ba2str(&opts.dst, addr); - g_set_error(gerr, BT_IO_ERROR, err, + g_set_error(gerr, BT_IO_ERROR, -err, "connect to %s: %s (%d)", addr, strerror(-err), -err); g_io_channel_unref(io);