|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|