diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-11-18 10:31:09 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-11-18 10:31:09 +0000 |
commit | 5dea08c9f947ada8c649274d3e1de4decd01e2a5 (patch) | |
tree | dc1293c7050014924d3d81a02267408dee89ed87 /rfc2231.c | |
parent | 9f82003c66b1f2118bfe3e63649bfa4550414f1d (diff) |
Some rather cosmetic changes.
Diffstat (limited to 'rfc2231.c')
-rw-r--r-- | rfc2231.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -89,7 +89,10 @@ void rfc2231_decode_parameters (PARAMETER **headp) int encoded; int index; - + short dirty = 0; /* set to 1 when we may have created + * empty parameters. + */ + if (!headp) return; purge_empty_parameters (headp); @@ -121,10 +124,12 @@ void rfc2231_decode_parameters (PARAMETER **headp) s = rfc2231_get_charset (p->value, charset, sizeof (charset)); rfc2231_decode_one (p->value, s, charset); - + *last = p; last = &p->next; p->next = NULL; + + dirty = 1; } else { @@ -147,16 +152,19 @@ void rfc2231_decode_parameters (PARAMETER **headp) safe_free ((void **) &p); rfc2231_list_insert (&conthead, conttmp); - } } if (conthead) + { rfc2231_join_continuations (last, conthead); + dirty = 1; + } *headp = head; - purge_empty_parameters (headp); + if (dirty) + purge_empty_parameters (headp); } static struct rfc2231_parameter *rfc2231_new_parameter (void) |