1 Index: spamass-milter/spamass-milter.cpp
2 ===================================================================
3 --- spamass-milter.orig/spamass-milter.cpp 2012-06-21 13:02:08.000000000 -0700
4 +++ spamass-milter/spamass-milter.cpp 2012-06-21 13:02:15.000000000 -0700
8 /* Update a header if SA changes it, or add it if it is new. */
9 -void update_or_insert(SpamAssassin* assassin, SMFICTX* ctx, string oldstring, t_setter setter, char *header )
10 +void update_or_insert(SpamAssassin* assassin, SMFICTX* ctx, string oldstring, t_setter setter, const char *header )
12 string::size_type eoh1 = assassin->d().find("\n\n");
13 string::size_type eoh2 = assassin->d().find("\n\r\n");
16 /* change if old one was present, append if non-null */
17 char* cstr = const_cast<char*>(newstring.c_str());
18 + char* hstr = const_cast<char*>(header);
21 debug(D_UORI, "u_or_i: changing");
22 - smfi_chgheader(ctx, header, 1, newstring.size() > 0 ?
23 + smfi_chgheader(ctx, hstr, 1, newstring.size() > 0 ?
25 } else if (newstring.size() > 0)
27 debug(D_UORI, "u_or_i: inserting");
28 - smfi_addheader(ctx, header, cstr);
29 + smfi_addheader(ctx, hstr, cstr);