From 63c3d59d2f821e8a872b67b609382333ebc51a4a Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 24 Sep 2021 19:17:47 +0200 Subject: [PATCH] [spotify] Preserve fine-grained errors from request_make() --- src/inputs/librespot-c/src/librespot-c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/inputs/librespot-c/src/librespot-c.c b/src/inputs/librespot-c/src/librespot-c.c index 1a794d68..4c45c80d 100644 --- a/src/inputs/librespot-c/src/librespot-c.c +++ b/src/inputs/librespot-c/src/librespot-c.c @@ -471,7 +471,7 @@ track_write(void *arg, int *retval) ret = request_make(MSG_TYPE_CHUNK_REQUEST, session); if (ret < 0) - RETURN_ERROR(SP_ERR_NOCONNECTION, "Could not send request for audio chunk"); + RETURN_ERROR(ret, sp_errmsg); channel->progress_cb = cmdargs->progress_cb; channel->cb_arg = cmdargs->cb_arg; @@ -543,7 +543,7 @@ track_seek(void *arg, int *retval) ret = request_make(MSG_TYPE_CHUNK_REQUEST, session); if (ret < 0) - RETURN_ERROR(SP_ERR_NOCONNECTION, "Could not send track seek request"); + RETURN_ERROR(ret, sp_errmsg); *retval = 1; return COMMAND_PENDING; @@ -612,7 +612,7 @@ media_open(void *arg, int *retval) // then the first chunk (incl. headers) ret = request_make(type, session); if (ret < 0) - RETURN_ERROR(SP_ERR_NOCONNECTION, "Could not send media request"); + RETURN_ERROR(ret, sp_errmsg); *retval = 1; return COMMAND_PENDING;