Browse Source

optional message fields

doc_update_sequoia
vb 7 years ago
parent
commit
fd9311adf0
2 changed files with 8 additions and 0 deletions
  1. +7
    -0
      src/transport.c
  2. +1
    -0
      src/transport.h

+ 7
- 0
src/transport.c View File

@ -595,6 +595,7 @@ DYNAMIC_API void free_message(message *msg)
free_stringlist(msg->references);
free_stringlist(msg->keywords);
free(msg->comments);
free_stringpair_map(msg->opt_fields);
free(msg);
}
}
@ -721,6 +722,12 @@ DYNAMIC_API message * message_dup(const message *src)
goto enomem;
}
if (src->opt_fields) {
msg->opt_fields = stringpair_map_dup(src->opt_fields);
if (msg->opt_fields == NULL)
goto enomem;
}
msg->enc_format = src->enc_format;
return msg;


+ 1
- 0
src/transport.h View File

@ -332,6 +332,7 @@ typedef struct _message {
// refered
stringlist_t *keywords; // list of UTF-8 strings with keywords
char *comments; // UTF-8 string with comments
stringpair_map_t *opt_fields; // optional fields
PEP_enc_format enc_format; // format of encrypted data
} message;


Loading…
Cancel
Save