RE: A DLR question

"Oded Arbel" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Andrea. 

About the DLRs - it's really bothering me, so I would appreciate it if
you could please notify me of your findings. 
I still think that all DLRs should be handled by dlr.c - though I admit
that doing dlr_add() and then dlr_find() right on top of that is not
nice. maybe we should have a dlr_create(), or have dlr_add() also
generate a new Msg* .

in the mean time, I submit my patch against dlr.c (don't remember if
I've done it already), and I hope you will consider it for CVS.

TIA

Oded Arbel
m-Wise Inc.
[email protected]

--
No Operation Plan ever survives initial contact.
	-- Finagle's Military Laws n°117


> -----Original Message-----
> From: Andreas Fink [mailto:[email protected]]
> Sent: Tuesday, February 19, 2002 11:38 AM
> To: Oded Arbel
> Subject: RE: A DLR question
> 
> 
> >  > -----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 :
> 
> yes its emi2 only. I think we can start dropping the old "emi" 
> driver. No real use for it anymore.
> 
> 
> >	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));
> 
> 
> 
> Youre right. This however is completely wrong in my eyes. it should 
> report  values DLR_SUCCESS (0x01) and DLR_FAIL (0x02).
> 
> I take a deeper look into this as there's a bug to be fixed.
> 
> 
> >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 ;-)
> >
> 
> Hmm. go back a few revisions before the send loop was changed and 
> you'll find it.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.