misc. fixes to view.conf message creation.
This commit is contained in:
parent
0eddc08f46
commit
528d797953
|
@ -1826,8 +1826,6 @@ static int mms_convert_to_mboxdescr(MmsMsg *mm, Octstr *cloc, List *reqhdrs,
|
||||||
http_header_add(mh, "X-Mms-MM-State", octstr_get_cstr(xstate));
|
http_header_add(mh, "X-Mms-MM-State", octstr_get_cstr(xstate));
|
||||||
octstr_destroy(xstate);
|
octstr_destroy(xstate);
|
||||||
}
|
}
|
||||||
http_destroy_headers(mm->headers);
|
|
||||||
mm->headers = mh;
|
|
||||||
|
|
||||||
if (!addcontent) {
|
if (!addcontent) {
|
||||||
if (mm->ismultipart)
|
if (mm->ismultipart)
|
||||||
|
@ -1835,7 +1833,17 @@ static int mms_convert_to_mboxdescr(MmsMsg *mm, Octstr *cloc, List *reqhdrs,
|
||||||
else if (mm->body.s)
|
else if (mm->body.s)
|
||||||
octstr_destroy(mm->body.s);
|
octstr_destroy(mm->body.s);
|
||||||
mm->body.s = NULL;
|
mm->body.s = NULL;
|
||||||
|
} else {
|
||||||
|
/* copy over content type. */
|
||||||
|
Octstr *ctype = http_header_value(mm->headers, octstr_imm("Content-Type"));
|
||||||
|
if (ctype) {
|
||||||
|
http_header_add(mh, "Content-Type", octstr_get_cstr(ctype));
|
||||||
|
octstr_destroy(ctype);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
http_destroy_headers(mm->headers);
|
||||||
|
mm->headers = mh;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1906,7 +1914,8 @@ MmsMsg *mms_viewconf(char *transid,
|
||||||
if (octstr_len(ms) + msize <= maxsize) {
|
if (octstr_len(ms) + msize <= maxsize) {
|
||||||
MIMEEntity *mtmp = mime_entity_create();
|
MIMEEntity *mtmp = mime_entity_create();
|
||||||
|
|
||||||
http_header_add(mtmp->headers, "Content-Type", "application/vnd.wap.mms-message");
|
http_header_add(mtmp->headers, "Content-Type",
|
||||||
|
"application/vnd.wap.mms-message");
|
||||||
mtmp->body = ms;
|
mtmp->body = ms;
|
||||||
|
|
||||||
list_append(m->body.l, mtmp);
|
list_append(m->body.l, mtmp);
|
||||||
|
|
Loading…
Reference in New Issue