summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-19 22:35:20 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-19 22:35:20 +0200
commitaff6a6e5e5661b523e3cf03bd93911b72d5e36d9 (patch)
treea82f1d9c874765691a0e4317421d42c41274ca16
parent95011fa7fefef7c7f5ca2f2815adc8e0a9de2904 (diff)
Fix finalize_discovery calls to pass correct error code
-rw-r--r--audio/avdtp.c4
1 files 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;
}
}