ENGINE-214: fixed problem due to ambiguous flag name. Will change flag next, but shelving changes to look at another bug. ENGINE-214
authorKrista Bennett <krista@pep-project.org>
Fri, 06 Oct 2017 09:37:06 +0200
branchENGINE-214
changeset 2138018bf5daa50d
parent 2137 96a82799439b
child 2147 22394e4b5047
ENGINE-214: fixed problem due to ambiguous flag name. Will change flag next, but shelving changes to look at another bug.
src/message_api.c
     1.1 --- a/src/message_api.c	Thu Oct 05 12:12:58 2017 +0200
     1.2 +++ b/src/message_api.c	Fri Oct 06 09:37:06 2017 +0200
     1.3 @@ -529,8 +529,9 @@
     1.4  
     1.5      // Right now, we only encrypt inner messages or outer messages. There
     1.6      // is no in-between. All messages are to be wrapped or are a wrapper.
     1.7 +    // FIXME: rename this flag!!!
     1.8      const char* msg_wrap_info = (flags & PEP_encrypt_flag_no_wrap_message ? 
     1.9 -                                 "OUTER" : "INNER");
    1.10 +                                 "INNER" : "OUTER");
    1.11      
    1.12      ptext = encapsulate_message_wrap_info(msg_wrap_info, src->longmsg);
    1.13          
    1.14 @@ -2332,7 +2333,10 @@
    1.15                      while (actual_message) {
    1.16                          char* mime_type = actual_message->mime_type;
    1.17                          if (mime_type) {
    1.18 -                            if (strcmp("message/rfc822", mime_type) == 0)
    1.19 +                            // libetpan appears to change the mime_type on this one.
    1.20 +                            // *growl*
    1.21 +                            if (strcmp("message/rfc822", mime_type) == 0 ||
    1.22 +                                strcmp("text/rfc822", mime_type) == 0)
    1.23                                  break;
    1.24                          }
    1.25                          actual_message = actual_message->next;