From af277fdedc99e98ab35f26d158ffe0c6353fd273 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 24 Aug 2019 11:32:16 +0200 Subject: [PATCH] bluetooth: fix getting error code creating sdp-session in nm_bluez5_dun_connect() --- src/devices/bluetooth/nm-bluez5-dun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/bluetooth/nm-bluez5-dun.c b/src/devices/bluetooth/nm-bluez5-dun.c index b9a1fa0ab..ccb6f91ac 100644 --- a/src/devices/bluetooth/nm-bluez5-dun.c +++ b/src/devices/bluetooth/nm-bluez5-dun.c @@ -353,8 +353,8 @@ nm_bluez5_dun_connect (NMBluez5DunContext *context, context->sdp_session = sdp_connect (&context->src, &context->dst, SDP_NON_BLOCKING); if (!context->sdp_session) { + int err = errno; GError *error; - int err = sdp_get_error (context->sdp_session); error = g_error_new (NM_BT_ERROR, NM_BT_ERROR_DUN_CONNECT_FAILED, "Failed to connect to the SDP server: (%d) %s",