]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
gcrypt: Rename E_OEAP to E_RSA_DECODE.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Jul 2016 14:32:39 +0000 (16:32 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 7 Jan 2017 19:23:40 +0000 (20:23 +0100)
This error code was misleading since gcry_sexp_nth_data() can fail
for other reasons as well. The patch also removes a pointless error
message.

error.h
gcrypt.c

diff --git a/error.h b/error.h
index dbd97ae10d6b054ce9df0bdaeb7ac2a295b2c931..3daee6af196dcadda49bb51bdad6337c31055693 100644 (file)
--- a/error.h
+++ b/error.h
        PARA_ERROR(NOT_PLAYING, "not playing"), \
        PARA_ERROR(NO_VALID_FILES, "no valid file found in playlist"), \
        PARA_ERROR(NO_WMA, "asf/wma format not recognized"), \
-       PARA_ERROR(OEAP, "error during oeap (un)padding"), \
        PARA_ERROR(OGGDEC_BADHEADER, "invalid vorbis bitstream header"), \
        PARA_ERROR(OGGDEC_BADLINK, "invalid stream section or requested link corrupt"), \
        PARA_ERROR(OGGDEC_FAULT, "bug or heap/stack corruption"), \
        PARA_ERROR(REGEX, "regular expression error"), \
        PARA_ERROR(RESAMPLE_EOF, "resample filter: end of file"), \
        PARA_ERROR(RSA, "RSA error"), \
+       PARA_ERROR(RSA_DECODE, "RSA decoding error"), \
        PARA_ERROR(SB_PACKET_SIZE, "invalid sideband packet size or protocol error"), \
        PARA_ERROR(SCM_CREDENTIALS, "did not receive SCM credentials"), \
        PARA_ERROR(SENDER_CMD, "command not supported by this sender"), \
index f4dbeb8e32c7aee89a5d1b6bd6444811616a0a8c..7d6b2cae611f4946b5671ece39d0000d39a8f7b2 100644 (file)
--- a/gcrypt.c
+++ b/gcrypt.c
@@ -601,10 +601,8 @@ static int decode_rsa(gcry_sexp_t sexp, unsigned char *outbuf, size_t *nbytes)
 {
        const char *p = gcry_sexp_nth_data(sexp, 1, nbytes);
 
-       if (!p) {
-               PARA_ERROR_LOG("could not get data from list\n");
-               return -E_OEAP;
-       }
+       if (!p)
+               return -E_RSA_DECODE;
        memcpy(outbuf, p, *nbytes);
        return 1;
 }