1
0
Fork 0

misc. fixes to view.conf message creation.

This commit is contained in:
bagyenda 2005-04-19 09:43:10 +00:00
parent 0eddc08f46
commit 528d797953
1 changed files with 12 additions and 3 deletions

View File

@ -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));
octstr_destroy(xstate);
}
http_destroy_headers(mm->headers);
mm->headers = mh;
if (!addcontent) {
if (mm->ismultipart)
@ -1835,7 +1833,17 @@ static int mms_convert_to_mboxdescr(MmsMsg *mm, Octstr *cloc, List *reqhdrs,
else if (mm->body.s)
octstr_destroy(mm->body.s);
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;
}
@ -1906,7 +1914,8 @@ MmsMsg *mms_viewconf(char *transid,
if (octstr_len(ms) + msize <= maxsize) {
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;
list_append(m->body.l, mtmp);