fixed decrypt_status mess in decrypt_message() in case of missing key, introduced in 4135e2be98f8
authorEdouard Tisserant <edouard@pep-project.org>
Wed, 12 Oct 2016 18:19:40 +0200
changeset 12732508cc3ea9dc
parent 1272 d7db8e18f439
child 1274 e35e9eada9ca
fixed decrypt_status mess in decrypt_message() in case of missing key, introduced in 4135e2be98f8
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Oct 12 17:22:30 2016 +0200
     1.2 +++ b/src/message_api.c	Wed Oct 12 18:19:40 2016 +0200
     1.3 @@ -1441,12 +1441,14 @@
     1.4          goto pep_error;
     1.5      }
     1.6  
     1.7 +    decrypt_status = status;
     1.8 +
     1.9      if (status == PEP_DECRYPT_NO_KEY){
    1.10          status = inject_DeviceState_event(session, CannotDecrypt, NULL, NULL);
    1.11 +        if (status != PEP_STATUS_OK)
    1.12 +            goto pep_error;
    1.13      }
    1.14  
    1.15 -    decrypt_status = status;
    1.16 -
    1.17      bool imported_private_key_address = false; 
    1.18  
    1.19      if (ptext) {