> -----Original Message----- > From: Harrie Hazewinkel [mailto:[EMAIL PROTECTED]] > > Hi Oded, > > Good catch. > > Forgive if I sound stupid, but regarding the length of an address. > If it is really bigger then 20 can one just discard the part of the > address that is longer??
I don't know - I don't think that there are addresses longer then 20 chars, and if there are - these can not be used with SMPP which only supports addresses as big as 20 chars. I'm not sure of the correct implementation here as I have yet to see any usage examples, but we can hold a hypothetical discussion in the list about how an address longer then 20 chars will look like and how it should be handled if the SMSC does not support such addresses. > That sounds weird to me, or is the address only used internal in the > smpp part as some indication?? The receiver address is used as the target MSISDN for the SM and the sender address is used to inform the receiving party of who sent the SM and where to reply too. at least the later can be alpha numeric. > On top of your patch, would it not be better to have the length of an > address > in some #define and use that?? Then changing the length is > done in one place > only. it is - in the smpp_pdu.def : <snip> PDU(submit_sm, 0x00000004, HEADER NULTERMINATED(service_type, 6) INTEGER(source_addr_ton, 1) INTEGER(source_addr_npi, 1) NULTERMINATED(source_addr, 21) INTEGER(dest_addr_ton, 1) INTEGER(dest_addr_npi, 1) NULTERMINATED(destination_addr, 21) </snip> notice the dest_addr and source_addr which are defined as 21 chars null terminated buffers. -- Oded Arbel m-Wise mobile solutions [EMAIL PROTECTED] +972-9-9581711 (116) +972-67-340014 ::.. "...[T]he lesson [comic books] taught children- or this child, at any rate- was perhaps the unintentionally radical truth that exceptionality was the greatest and most heroic of values; that those who were unlike the crowd were to be treasured the most lovingly; and that this exceptionality was a treasure so great that it had to be concealed, in ordinary life, beneath what the comic books called a 'secret identity'." -- Salman Rushdie