Re: Fw: Help with setting sm_length!
Nisan Bloch <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi
check the latest cvs.. gw/smsc/smsc_smpp.c function msg_to_pdu sets the
sm_length
nisan
At 04:46 PM 4/14/03 +0200, Alexander Malysh wrote:
>Am Montag, 14. April 2003 16:51 schrieb Yury Mikhienko:
>[snip]
> >
> > May be I'm stupib, but in smpp_pdu_pack function I dont see the point of
> > calculating size of message and placing value into sm_length. In my
> > opinion, sm_length is the INTEGER field in pdu.submit_sm structure, and I
> > found defenition length of fields and packing into PDU only: ...
> > switch (pdu->type) {
> > #define OPTIONAL_BEGIN(num_expected)
> > #define TLV(tag_id, min_len, max_len)
> > #define OPTIONAL_END
> > #define INTEGER(name, octets) p = *(&p);
> > #define NULTERMINATED(name, max_octets) p = *(&p);
> > #define OCTETS(name, field_giving_octets) \
> > p->field_giving_octets = octstr_len(p->name);
>
>here sm_length will be calculated , after preprocessing:
> p->sm_length = octstr_len(p->short_message);
>
>
>[snip]
>
>--
>Best regards / Mit besten Grüßen aus Köln
>
>Dipl.-Ing.
>Alexander Malysh
>___________________________________
>
>Centrium GmbH
>Ehrenstrasse 2
>50672 Köln
>
>Fon: +49 (0221) 277 49 240
>Fax: +49 (0221) 277 49 109
>
>email: [email protected]
>web: http://www.centrium.de
>msn: [email protected]