1
0
Fork 0

*** empty log message ***

This commit is contained in:
bagyenda 2008-06-27 17:02:28 +00:00
parent 505e998657
commit ce84ac2e7b
4 changed files with 27 additions and 11 deletions

View File

@ -1,3 +1,5 @@
2008-06-27 P. A. Bagyenda <bagyenda@dsmagic.com>
* Minor fix to MM4 .RES handling: use proxy sendmail command if present
2008-06-26 P. A. Bagyenda <bagyenda@dsmagic.com>
* Added pgsql-queue into build process (configure.ac)
* Misc. Changes to pluggable mmsbox-mmsc interface

View File

@ -1827,6 +1827,8 @@ MIMEEntity *make_multipart_formdata(void)
MIMEEntity *x = mime_entity_create();
List *rh = http_create_empty_headers();
http_header_add(rh, "User-Agent", MM_NAME "/" VERSION);
http_header_add(rh, "Accept", "*/*");
http_header_add(rh, "Content-Type", "multipart/form-data");
mime_replace_headers(x, rh);
http_destroy_headers(rh);
@ -1847,11 +1849,10 @@ void add_multipart_form_field(MIMEEntity *multipart, char *field_name, char *cty
http_header_add(xh, "Content-Disposition", octstr_get_cstr(cd));
if (ctype) /* This header must come after the above it seems. */
http_header_add(xh, "Content-Type", ctype);
mime_entity_set_body(p, data);
mime_replace_headers(p, xh);
mime_entity_set_body(p, data);
mime_entity_add_part(multipart, p); /* add it to list so far. */
mime_entity_destroy(p);

View File

@ -955,7 +955,7 @@ static int make_and_queue_msg(Octstr *data, Octstr *ctype, List *reply_headers,
m = mms_frommime(mime);
mime_entity_destroy(mime);
}
} else if (octstr_case_compare(ctype, octstr_imm("application/smil")) == 0) {
} else if (octstr_case_search(ctype, octstr_imm("application/smil"), 0) == 0) {
xmlDocPtr smil;
xmlChar *buf = NULL;
int bsize = 0;

View File

@ -45,7 +45,8 @@ static void fixup_recipient(void);
static void fixup_sender(void);
static void fixup_addresses(List *headers);
static void send_mm4_res(int mtype, Octstr *to, Octstr *sender, Octstr *transid, char *status, Octstr *msgid);
static void send_mm4_res(int mtype, Octstr *to, Octstr *sender, Octstr *transid, char *status, Octstr *msgid,
Octstr *sendmail_cmd);
static void strip_quotes(Octstr *s);
@ -466,10 +467,21 @@ int main(int argc, char *argv[])
/* respond to the sender as necessary. */
if (mm4_type &&
err &&
ack && octstr_str_case_compare(ack, "Yes") == 0)
send_mm4_res(mtype+1, orig_sys, me, transid, err, newmsgid);
ack && octstr_str_case_compare(ack, "Yes") == 0) {
int i, n;
Octstr *sendmail_cmd = settings->sendmail;
/* try and find proxy and it's send command. */
if (xproxy)
for (i = 0, n = gwlist_len(proxyrelays); i<n; i++) {
MmsProxyRelay *mp = gwlist_get(proxyrelays, i);
if (mp && octstr_case_compare(xproxy, mp->host) == 0 &&
mp->sendmail) {
sendmail_cmd = mp->sendmail;
break;
}
}
send_mm4_res(mtype+1, orig_sys, me, transid, err, newmsgid, sendmail_cmd);
}
octstr_destroy(mm4_type);
octstr_destroy(transid);
octstr_destroy(orig_sys);
@ -613,7 +625,8 @@ static void fixup_addresses(List *headers)
fixup_address_type(headers, "From");
}
static void send_mm4_res(int mtype, Octstr *to, Octstr *sender, Octstr *transid, char *status, Octstr *msgid)
static void send_mm4_res(int mtype, Octstr *to, Octstr *sender, Octstr *transid, char *status, Octstr *msgid,
Octstr *sendmail_cmd)
{
char tmp[32];
List *h = http_create_empty_headers();
@ -637,7 +650,7 @@ static void send_mm4_res(int mtype, Octstr *to, Octstr *sender, Octstr *transid,
mime_replace_headers(m, h);
http_destroy_headers(h);
mm_send_to_email(to, sender, octstr_imm(""), msgid, m, 0, &err, octstr_get_cstr(settings->sendmail),
mm_send_to_email(to, sender, octstr_imm(""), msgid, m, 0, &err, octstr_get_cstr(sendmail_cmd),
settings->hostname);
if (err) {
warning(0, "MM4 send.RES reported: %s!", octstr_get_cstr(err));