> -----Original Message-----
> 
> >Well, actually.. that's what I'm doing :-/ .
> >So, to rephrase my question - how do I create a DLR on an 
> SMSC_FAIL or
> >SMSC_SUCCESS, w/o calling dlr_add/dlr_find ?
> >from looking at emi2, that's exactly what's happening - first it does
> >dlr_add (for SMSC_*) and later does dlr_find on them. of course, it
> >makes much more sense how it happens in the emi2 code, then 
> in my code
> >where I call dlr_add only to call dlr_find in the next statement.
> 
> 8 and 16 are generated in EMI driver and never passed on to dlr.c. 
> The message is internally generated and passed back to 
> bearerbox/smsbox and is not generated by dlr_find (it cant find those 
> messages ever).

Well - from reading the emi2 sources (couldn't find anything about DLR
in emi), it seems to me that the driver does generate the SMSC_* DLRs by
using dlr_add/dlr_find, and here's the code snippets :

        if (msg->sms.dlr_mask & 0x18) {
<snip>
            dlr_add(octstr_get_cstr(conn->id), 
                    octstr_get_cstr(ts),
                    octstr_get_cstr(emimsg->fields[E50_ADC]),
                    octstr_get_cstr(msg->sms.service),
                    octstr_get_cstr(msg->sms.dlr_url),
                    msg->sms.dlr_mask);
(0x18 being, of course, SMSC_FAIL and SMSC_SUCCESS)
and then :
        dlrmsg = dlr_find(octstr_get_cstr(conn->id), 
                  octstr_get_cstr(ts), /* timestamp */
                  octstr_get_cstr(origmsg->sms.receiver), /* destination
*/
                  (octstr_get_char(emimsg->fields[0], 0) == 'A' ? 
                   DLR_SMSC_SUCCESS : DLR_SMSC_FAIL));

I would really appreciate it if you can point me to where exactly the
EMI driver generates the SMSC_* DLRs internally, as in my current
implementation the generation of those DLRs is done calling dlr_add and
immediately dlr_find, which as you stated - is not the best approach ;-)

Oded Arbel
m-Wise Inc.
[EMAIL PROTECTED]

--
Work is of two kinds: first, altering the position of matter at or near
the earth's
surface relatively to other matter; second, telling other people to do
so. 
The first kind is unpleasant and ill-paid, the second is pleasant and
highly paid. 
        -- Bertrand Russell 

Reply via email to