From d328981381cec52309a57b991bad0b832b4b9373 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 9 Oct 2007 13:36:33 +0000 Subject: Handle cross-connect case for AVDTP --- audio/avdtp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'audio/avdtp.c') diff --git a/audio/avdtp.c b/audio/avdtp.c index ee1bd06d..0fb64bb0 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -499,6 +499,23 @@ void avdtp_error_init(struct avdtp_error *err, uint8_t type, int id) } } +avdtp_error_type_t avdtp_error_type(struct avdtp_error *err) +{ + return err->type; +} + +int avdtp_error_error_code(struct avdtp_error *err) +{ + assert(err->type == AVDTP_ERROR_ERROR_CODE); + return err->err.error_code; +} + +int avdtp_error_posix_errno(struct avdtp_error *err) +{ + assert(err->type == AVDTP_ERROR_ERRNO); + return err->err.posix_errno; +} + static struct avdtp_stream *find_stream_by_rseid(struct avdtp *session, uint8_t rseid) { -- cgit