1
0
Fork 0

Kannel patch update: coding of content-id value fixed, fix to detect charset values in CAPS.

Email2MMS: Removed extra email headers that caused problems for some phones.
This commit is contained in:
bagyenda 2005-07-08 12:32:27 +00:00
parent f6c90d2c9a
commit c93a5ca1bb
2 changed files with 28 additions and 1 deletions

View File

@ -916,7 +916,7 @@ diff -Naur gateway-1.4.0/test/test_ppg.c gateway-1.4.0-patched/test/test_ppg.c
diff -Naur gateway-1.4.0/wap/wsp_headers.c gateway-1.4.0-patched/wap/wsp_headers.c
--- gateway-1.4.0/wap/wsp_headers.c 2004-08-08 23:39:56.000000000 +0300
+++ gateway-1.4.0-patched/wap/wsp_headers.c 2005-07-06 08:48:20.000000000 +0300
+++ gateway-1.4.0-patched/wap/wsp_headers.c 2005-07-07 18:53:59.000000000 +0300
@@ -122,10 +122,9 @@
} else if (val > 127) {
*well_known_value = val - 128;
@ -964,6 +964,28 @@ diff -Naur gateway-1.4.0/wap/wsp_headers.c gateway-1.4.0-patched/wap/wsp_headers
/* Pack text as Quoted-string if it starts with a " character.
* Pack it as Text-string otherwise. */
static void pack_quoted_string(Octstr *packed, Octstr *text)
@@ -1884,6 +1893,7 @@
keytoken = wsp_string_to_versioned_parameter(parm->key, WSP_1_2);
if (keytoken >= 0) {
+ Octstr *s;
/* Typed-parameter = Well-known-parameter-token Typed-value */
/* Well-known-parameter-token = Integer-value */
wsp_pack_integer_value(packed, keytoken);
@@ -1904,7 +1914,12 @@
}
break;
case 1: /* charset */
- tmp = wsp_string_to_charset(parm->value);
+
+ s = octstr_duplicate(parm->value); /* lower-case it. */
+ octstr_convert_range(s, 0, octstr_len(s), tolower);
+
+ tmp = wsp_string_to_charset(s);
+ octstr_destroy(s);
if (tmp >= 0) {
wsp_pack_integer_value(packed, tmp);
return;
diff -Naur gateway-1.4.0/wap/wsp_headers.h gateway-1.4.0-patched/wap/wsp_headers.h
--- gateway-1.4.0/wap/wsp_headers.h 2004-01-26 18:06:38.000000000 +0300
+++ gateway-1.4.0-patched/wap/wsp_headers.h 2005-07-06 08:19:01.000000000 +0300

View File

@ -101,6 +101,11 @@ int main(int argc, char *argv[])
unbase64_mimeparts(mm);
unpack_mimeheaders(mm);
/* Delete some headers... */
http_header_remove_all(mm->headers, "Received");
http_header_remove_all(mm->headers, "X-MimeOLE");
http_header_remove_all(mm->headers, "X-Mailer");
/* Now convert from mime to MMS message. */
msg = mms_frommime(mm);
mime_entity_destroy(mm);