ENGINE-345 - return PEP_rating_undefined when there is no recipient (let me know if you are getting it for other reasons; if all identities are somehow broken or the DB chokes, this can happen here as well
authorKrista Bennett <krista@pep-project.org>
Mon, 19 Feb 2018 09:08:03 +0100
changeset 25166e706549d666
parent 2515 62d3239ac7a9
child 2517 5df0ed0fb25f
ENGINE-345 - return PEP_rating_undefined when there is no recipient (let me know if you are getting it for other reasons; if all identities are somehow broken or the DB chokes, this can happen here as well
src/message_api.c
     1.1 --- a/src/message_api.c	Sun Feb 18 01:26:23 2018 +0100
     1.2 +++ b/src/message_api.c	Mon Feb 19 09:08:03 2018 +0100
     1.3 @@ -2959,12 +2959,12 @@
     1.4  
     1.5      if (comm_type_determined == false) {
     1.6          // likely means there was a massive screwup with no sender or recipient
     1.7 -        // keys, but regardless, this'll end up being unencrypted
     1.8 -        *rating = PEP_rating_unencrypted;
     1.9 +        // keys
    1.10 +        *rating = PEP_rating_undefined;
    1.11      }
    1.12      else
    1.13          *rating = _MAX(_rating(max_comm_type, PEP_rating_undefined),
    1.14 -                PEP_rating_unencrypted);
    1.15 +                               PEP_rating_unencrypted);
    1.16  
    1.17      return PEP_STATUS_OK;
    1.18  }