From 966561e04a9ac0ab172feb2381f76aa5a07f927c Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Tue, 14 Feb 2012 10:06:33 +0100 Subject: [PATCH] a2dp: return NotSupported error if no server found With both sink and sources disabled, the A2DP server is not even registered in audio_manager_init. When trying to register the endpoint, this should result in the same error as if the server existed but the profile was disabled. --- audio/a2dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/a2dp.c b/audio/a2dp.c index bbb91cec7..623a0bcbb 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -1589,7 +1589,7 @@ struct a2dp_sep *a2dp_add_sep(const bdaddr_t *src, uint8_t type, server = find_server(servers, src); if (server == NULL) { if (err) - *err = -EINVAL; + *err = -EPROTONOSUPPORT; return NULL; } -- 2.11.0