summaryrefslogtreecommitdiff
path: root/pith/send.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-12-16 13:42:37 -0700
committerEduardo Chappa <chappa@washington.edu>2018-12-16 13:42:37 -0700
commitea4d5cd8e41c3241d8bebe4f7bbb2b7603e05283 (patch)
tree79b212bcf956fd6c54e1f4f0cbee9cdbe1d1d2f5 /pith/send.c
parentc7e14ba2c2ac2a858539dcb4f077d8fb03988c06 (diff)
downloadalpine-ea4d5cd8e41c3241d8bebe4f7bbb2b7603e05283.tar.xz
* Bug: When a message is multipart, and the first part is flowed text,
then forwarding the message will set the first part to be flowed, and sent that way even when the option Do Not Send Flowed Text is enabled. To avoid this issue, we remove any flowed text parameters from the body of the message, so we create a "remove_parameter" function, and then we set the flowed parameter only when the user requested. Reported by Holger Trapp.
Diffstat (limited to 'pith/send.c')
-rw-r--r--pith/send.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/pith/send.c b/pith/send.c
index dc5a500f..aea9c214 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -4120,6 +4120,31 @@ most_preferred_charset(unsigned long validbitmap)
return(charsetlist[index]);
}
+void
+remove_parameter(PARAMETER **param, char *paramname)
+{
+ PARAMETER *pm;
+
+ if(param == NULL || *param == NULL
+ || paramname == NULL || *paramname == '\0')
+ return;
+
+ for(pm = *param;
+ pm != NULL && pm->attribute != NULL && strucmp(pm->attribute, paramname);
+ pm = pm->next);
+
+ if(pm){
+ PARAMETER om, *qm;
+ om.next = *param;
+ for(qm = &om; qm->next != pm; qm = qm->next);
+ qm->next = pm->next;
+ pm->next = NULL;
+ mail_free_body_parameter(&pm);
+ if(*param == NULL)
+ mail_free_body_parameter(param);
+ }
+}
+
/*
* Set parameter to new value.