diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index a7303eb..3ec8e8e 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2008-07-01 P. A. Bagyenda + * Minor fix to MM4 interface -- address formatting fix 2008-06-27 P. A. Bagyenda * Minor fix to MM4 .RES handling: use proxy sendmail command if present 2008-06-26 P. A. Bagyenda diff --git a/mbuni/mmsc/mmsfromemail.c b/mbuni/mmsc/mmsfromemail.c index a423eae..f64b944 100644 --- a/mbuni/mmsc/mmsfromemail.c +++ b/mbuni/mmsc/mmsfromemail.c @@ -550,6 +550,7 @@ static void fixup_recipient(void) #if 0 normalize_number(octstr_get_cstr(settings->unified_prefix), &xto); #else + mms_normalize_phonenum(&xto, octstr_get_cstr(settings->unified_prefix), settings->strip_prefixes); @@ -558,14 +559,14 @@ static void fixup_recipient(void) } else { /* For now everything else is email. */ ttype = TEMAIL; } - if (typ) - octstr_destroy(typ); + + octstr_destroy(typ); } static void fixup_sender(void) { int i; - + /* Find the TYPE=xxx element. If it is there, it is a number. Strip the @ */ if (!xfrom) return; @@ -587,6 +588,10 @@ static void fixup_sender(void) else if (xproxy == NULL) xproxy = octstr_copy(xfrom, i+1, octstr_len(xfrom)); } + /* clean the number. */ + _mms_fixup_address(&xfrom, + octstr_get_cstr(settings->unified_prefix), + settings->strip_prefixes, 1); } static void fixup_address_type(List *headers, char *hdr) @@ -611,10 +616,14 @@ static void fixup_address_type(List *headers, char *hdr) octstr_delete(value, k, octstr_len(value)); } } + _mms_fixup_address(&value, + octstr_get_cstr(settings->unified_prefix), + settings->strip_prefixes, 1); + http_header_add(headers, octstr_get_cstr(name), octstr_get_cstr(value)); loop: - if (value) octstr_destroy(value); - if (name) octstr_destroy(name); + octstr_destroy(value); + octstr_destroy(name); } http_destroy_headers(l); } diff --git a/mbuni/todo b/mbuni/todo index f1f1fdd..347ca4f 100644 --- a/mbuni/todo +++ b/mbuni/todo @@ -3,9 +3,4 @@ - Need to parameterise some values: response messages (say on failed content adaptation) - Test suite - Correct handling of unrecognised mms headers. spec says pass them un-changed. -- Queue module needs to be de-coupled slightly from storage, so that mmsproxy can run on a separate box - but be able to initiate queue writes/reads over network. Hence pieces can run on separate boxes - (with mmsrelay providing network service for queue functions) - - Generalise billing interface -- Move outgoing VASP user/pass into URL