1
0
Fork 0

Minor fix to mmsbox - send_eaif missing X-Mms-Transaction-ID header

This commit is contained in:
bagyenda 2006-03-21 10:46:27 +00:00
parent 6972fad0fe
commit fa8e2b7f02
1 changed files with 6 additions and 4 deletions

View File

@ -610,8 +610,9 @@ done1:
}
static Octstr *mm7eaif_send(MmscGrp *mmc, Octstr *from, Octstr *to,
char *vasid,
MmsMsg *m, Octstr **error)
Octstr *transid,
char *vasid,
MmsMsg *m, Octstr **error)
{
Octstr *ret = NULL, *resp = NULL;
int mtype = mms_messagetype(m);
@ -642,7 +643,8 @@ static Octstr *mm7eaif_send(MmscGrp *mmc, Octstr *from, Octstr *to,
/* Patch the message FROM and TO fields. */
mms_replace_header_value(m, "From", octstr_get_cstr(from));
mms_replace_header_value(m, "To", octstr_get_cstr(to));
mms_replace_header_value(m,"X-Mms-Transaction-ID",
transid ? octstr_get_cstr(transid) : "000");
body = mms_tobinary(m);
hstatus = mmsbox_url_fetch_content(HTTP_METHOD_POST, mmc->mmsc_url, rh, body, &ph, &rbody);
@ -713,7 +715,7 @@ static int mms_sendtommsc(MmscGrp *mmc, Octstr *from, Octstr *to, Octstr *transi
if (mmc->type == SOAP_MMSC)
id = mm7soap_send(mmc, from, to, transid, linkedid, vasid, m, err);
else if (mmc->type == EAIF_MMSC)
id = mm7eaif_send(mmc, from, to, vasid, m, err);
id = mm7eaif_send(mmc, from, to, transid, vasid, m, err);
else
error(0, "MMC[%s] of unknown type, can't send!",
mmc->id ? octstr_get_cstr(mmc->id) : "");