A DLR question
"Oded Arbel" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi list.
I've got into some problems trying to implement DLRs for a module I'm
writing. Kannel supports five DLR typs : accepted, rejected, buffered,
accpeted by the SMSC and rejected by the SMSC. now I assume that the DLR
entry should persist until a final state is achieved, that is -
rejection (any which) or "accepted", but the DLR delete logic, as I see
in the source files is like this :
if((typ & DLR_BUFFERED) &&
((dlr_mask & DLR_SUCCESS) || (dlr_mask & DLR_FAIL)))
{
// don't delete
} else {
// delete
}
that means that if I try to send DLR on anything except "buffered" - the
DLR for that message will be lost. I don't think this is correct, as I
am also implementing the SMSC_* type DLRs, and when a SMSC_SUCCESS is
sent, I don't want the DLR to be deleted.
Wouldn't a better logic be something like this ?
if (
( (typ & DLR_SMSC_SUCCESS) && (dlr_mask & (DLR_SUCCESS |
DLR_BUFFERED | DLR_FAIL)) )
||
( (typ & DLR_BUFFERED) && (dlr_mask & (DLR_SUCCESS | DLR_FAIL))
)
) {
// don't delete
}
// delete
}
I'm sure there's a way to arrange the DLR states in such a way that you
could use a simple > or < expresssion to determine whether the DLR needs
to be deleted or not.
Cheers
Oded Arbel
m-Wise Inc.
[email protected]
--
There's no place like "Home"...*click*
-- Net Philosophies