From aff6a6e5e5661b523e3cf03bd93911b72d5e36d9 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 19 Feb 2009 22:35:20 +0200 Subject: Fix finalize_discovery calls to pass correct error code --- audio/avdtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/avdtp.c b/audio/avdtp.c index 396cb8da..3d383dfc 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -862,7 +862,7 @@ static void finalize_discovery(struct avdtp *session, int err) { struct avdtp_error avdtp_err; - avdtp_error_init(&avdtp_err, AVDTP_ERROR_ERRNO, -err); + avdtp_error_init(&avdtp_err, AVDTP_ERROR_ERRNO, err); if (!session->discov_cb) return; @@ -2218,7 +2218,7 @@ static gboolean avdtp_discover_resp(struct avdtp *session, AVDTP_GET_CAPABILITIES, &req, sizeof(req)); if (ret < 0) { - finalize_discovery(session, ret); + finalize_discovery(session, -ret); break; } } -- cgit