1
0
Fork 0

strip fixes -- more fixes

This commit is contained in:
bagyenda 2011-01-06 06:10:20 +00:00
parent 919aef48d5
commit fd2ff89411
1 changed files with 8 additions and 5 deletions

View File

@ -1598,16 +1598,18 @@ static void process_send_res(MmsEnvelope *e, MmsMsg *msg,
{ {
Octstr *rcpt = to->_x ? to->_x : to->rcpt; /* Might have a cleaned up recipient address */ Octstr *rcpt = to->_x ? to->_x : to->rcpt; /* Might have a cleaned up recipient address */
time_t tnow = time(NULL); time_t tnow = time(NULL);
Octstr *xfrom = octstr_duplicate(e->from); /* Because it might change below */
if (res == MMS_SEND_OK || res == MMS_SEND_QUEUED) { if (res == MMS_SEND_OK || res == MMS_SEND_QUEUED) {
to->process = 0; to->process = 0;
if (e->msgtype == MMS_MSGTYPE_SEND_REQ || if (e->msgtype == MMS_MSGTYPE_SEND_REQ ||
e->msgtype == MMS_MSGTYPE_RETRIEVE_CONF) /* queue dlr as needed. */ e->msgtype == MMS_MSGTYPE_RETRIEVE_CONF) /* queue dlr as needed. */
queue_dlr(mmc, e->from, rcpt, new_msgid, octstr_imm("Forwarded"), "MM7-Out", errl); queue_dlr(mmc, xfrom, rcpt, new_msgid, octstr_imm("Forwarded"), "MM7-Out", errl);
} else if (res == MMS_SEND_ERROR_FATAL && mmc) { } else if (res == MMS_SEND_ERROR_FATAL && mmc) {
if (e->msgtype == MMS_MSGTYPE_SEND_REQ || if (e->msgtype == MMS_MSGTYPE_SEND_REQ ||
e->msgtype == MMS_MSGTYPE_RETRIEVE_CONF) /* queue dlr as needed. */ e->msgtype == MMS_MSGTYPE_RETRIEVE_CONF) /* queue dlr as needed. */
queue_dlr(mmc, e->from, rcpt, e->msgId, queue_dlr(mmc, xfrom, rcpt, e->msgId,
(e->expiryt != 0 && e->expiryt < tnow) ? (e->expiryt != 0 && e->expiryt < tnow) ?
octstr_imm("Expired") : octstr_imm("Rejected"), octstr_imm("Expired") : octstr_imm("Rejected"),
"MM7-Out", errl); "MM7-Out", errl);
@ -1636,7 +1638,7 @@ static void process_send_res(MmsEnvelope *e, MmsMsg *msg,
/* Do CDR */ /* Do CDR */
cdrfs->logcdr(e->created, cdrfs->logcdr(e->created,
octstr_get_cstr(e->from), octstr_get_cstr(xfrom),
octstr_get_cstr(rcpt), octstr_get_cstr(rcpt),
octstr_get_cstr(e->msgId), octstr_get_cstr(e->msgId),
mmc ? octstr_get_cstr(mmc->id) : NULL, /* Should we touch mmc here? XXX */ mmc ? octstr_get_cstr(mmc->id) : NULL, /* Should we touch mmc here? XXX */
@ -1659,14 +1661,15 @@ static void process_send_res(MmsEnvelope *e, MmsMsg *msg,
if (err == NULL) if (err == NULL)
mms_info(0, "MM7", NULL, "%s MMSBox Outgoing Queue MMS Send: From %s, to %s, msgsize=%ld: msgid=[%s]", mms_info(0, "MM7", NULL, "%s MMSBox Outgoing Queue MMS Send: From %s, to %s, msgsize=%ld: msgid=[%s]",
SEND_ERROR_STR(res), SEND_ERROR_STR(res),
octstr_get_cstr(e->from), octstr_get_cstr(rcpt), e->msize, octstr_get_cstr(xfrom), octstr_get_cstr(rcpt), e->msize,
new_msgid ? octstr_get_cstr(new_msgid) : "N/A"); new_msgid ? octstr_get_cstr(new_msgid) : "N/A");
else else
mms_error_ex("MT", 0, mms_error_ex("MT", 0,
"MM7", NULL, "MM7", NULL,
"%s MMSBox Outgoing Queue MMS Send: From %s, to %s, msgsize=%ld: %s", "%s MMSBox Outgoing Queue MMS Send: From %s, to %s, msgsize=%ld: %s",
SEND_ERROR_STR(res), SEND_ERROR_STR(res),
octstr_get_cstr(e->from), octstr_get_cstr(rcpt), e->msize, octstr_get_cstr(err)); octstr_get_cstr(xfrom), octstr_get_cstr(rcpt), e->msize, octstr_get_cstr(err));
octstr_destroy(xfrom);
} }
/* Make a list of recpients up to max_rcpt */ /* Make a list of recpients up to max_rcpt */