On Sunday 20 July 2003 13:51, Oded Arbel wrote:
> On Sunday 20 July 2003 15:06, Alexander Malysh wrote:
> > On Sunday 20 July 2003 13:23, Oded Arbel wrote:
> > > On Sunday 20 July 2003 14:39, Alexander Malysh wrote:
> > > > I can not undestand , why this change should be done? We use msg id
> > > > only for our internally purposes and msg id has nothing todo with
> > > > provider msg id... Can you please explain why it should be needed ?
> > >
> > > Several providers required that we respond with a message identified
> > > that can be tracked, when a message is being sent to Kannel. using the
> > > kannel internal message id for that purpose is much easier then most
> > > other message tracking methods. this Id is usually required to be 64bit
> > > in length.
> >
> > do you speek now about smsbox's sendsms interface?
>
> No - I'm talking about bearerbox drivers.
>
> > then we should change Counter, in order to be able to handle long long...
>
> What counter ?
Counter is used to generate msg id ...
>
> > and why not just use
> > timestamp+msgid ?
>
> That's the workaround I've used for the SOAP driver. I've committed today
> the code to gwlib/utils that generates 64 bit long identifiers by using
> random and time stamp, assuming that its very very improbable to get the
> same 32 bit random number more then once in a single second.
Ok, i see now... Heh , do you have any situations that message id is not set?
then it's a bug and must be fixed!
Here we go through your code...
in static void soap_send_loop(SMSCConn* conn) you have:
if (!msg->sms.id) /* generate a message id */
msg->sms.id = gw_generate_id();
as I said , it's not possible that sgs->sms.id is not set... second: it will
not work with store-file, store file set these values (msg-id, timestamp).
in soap_parse_mo is the same...
if (msgid == -1) {
error(0,"SOAP: parse_mo - failed to get message ID, generate by
itself");
msg->sms.id = gw_generate_id(); /* generate a message id */
}
This message id will be overwriten in store-file, so you just not need it here
at all.
For required 64bit msg id just send:
(msg->sms.time << 32) + msg->sms.id
and you are done....
--
Best regards / Mit besten Gr��en aus D�sseldorf
Dipl.-Ing.
Alexander Malysh
___________________________________________
Centrium GmbH
Vogelsanger Weg 80
40470 D�sseldorf
Fon: +49 (0211) 74 84 51 80
Fax: +49 (0211) 277 49 109
email: a.malysh at centrium.de
web: www.centrium.de
msn: olek2002 at hotmail.com
icq: 98063111
___________________________________________
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html