ENGINE-74: Case of the disappearing comparison fixes...
authorKrista Grothoff <krista@pep-project.org>
Thu, 24 Nov 2016 14:39:53 +0100
changeset 14432a12b9227fb1
parent 1440 dabd893967de
child 1444 30d8ab127616
child 1448 205274ce42b4
ENGINE-74: Case of the disappearing comparison fixes...
src/message_api.c
     1.1 --- a/src/message_api.c	Thu Nov 24 13:51:15 2016 +0100
     1.2 +++ b/src/message_api.c	Thu Nov 24 14:39:53 2016 +0100
     1.3 @@ -1479,9 +1479,11 @@
     1.4      //
     1.5      if (!src->longmsg && !src->longmsg_formatted) {
     1.6          bloblist_t* attached_head = src->attachments;
     1.7 -        if (attached_head && strcasecmp(attached_head->mime_type, "application/pgp-encrypted")) {
     1.8 +        if (attached_head && 
     1.9 +            strcasecmp(attached_head->mime_type, "application/pgp-encrypted") == 0) {
    1.10              bloblist_t* enc_att_txt = attached_head->next;
    1.11 -            if (enc_att_txt && strcasecmp(enc_att_txt->mime_type, "application/octet-stream")) {
    1.12 +            if (enc_att_txt && 
    1.13 +                strcasecmp(enc_att_txt->mime_type, "application/octet-stream") == 0) {
    1.14                  size_t enc_att_len = enc_att_txt->size;
    1.15                  char* newlongmsg = calloc(1, enc_att_len + 1);
    1.16                  if (newlongmsg == NULL)