1
0
Fork 0

Misc. fixes to eaif implementation

This commit is contained in:
bagyenda 2005-04-18 10:31:49 +00:00
parent 2b2999a31e
commit 59ad03b55a
1 changed files with 10 additions and 2 deletions

View File

@ -1565,7 +1565,7 @@ static MmsVasp *find_mm7sender(List *headers, List *vasps)
MmsVasp *m = NULL;
int i, n;
#if 0
#if 1
return list_get(vasps,0); /* XXX for testing... */
#endif
if (!v ||
@ -1830,7 +1830,6 @@ static void mm7eaif_dispatch(MmsHTTPClientInfo *h)
" --> Enterred eaif send interface, blen=%d <--- ",
msize);
hfrom = http_header_value(h->headers, octstr_imm("X-NOKIA-MMSC-From"));
if (!h->body || /* A body is required, and must parse */
(m = mms_frombinary(h->body, hfrom ? hfrom : octstr_imm("anon@anon"))) == NULL) {
@ -1847,6 +1846,7 @@ static void mm7eaif_dispatch(MmsHTTPClientInfo *h)
*/
collect_senddata(mh, &to, &subject, &otransid, &expiryt, &deliveryt);
if ((hto = http_header_find_all(h->headers, "X-NOKIA-MMSC-To")) != NULL &&
list_len(hto) > 0) { /* To address is in headers. */
int i, n;
@ -1886,7 +1886,15 @@ static void mm7eaif_dispatch(MmsHTTPClientInfo *h)
if (expiryt < 0)
expiryt = time(NULL) + settings->default_msgexpiry;
if ((hfrom = http_header_value(h->headers, octstr_imm("X-NOKIA-MMSC-From"))) == NULL)
hfrom = http_header_value(mh, octstr_imm("From"));
mms_remove_headers(m, "Bcc");
mms_remove_headers(m, "X-Mms-Delivery-Time");
mms_remove_headers(m, "X-Mms-Expiry");
mms_remove_headers(m, "X-Mms-Sender-Visibility");
/* Save it, make msgid, put message id in header, return. */
qf = mms_queue_add(hfrom, to, subject,
NULL, NULL, deliveryt, expiryt, m, NULL,