RE: SMPP bug?
"Rene Kluwen" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I guess you are talking about two different things here. Some SMSC's omit a trailing NULL byte in text fields (e.g. to allow a password of 9 characters). Kannel detects this and indicates a warning message (the one that you mentioned). Actually, Kannel is just being "nice" here because according to section 5.4 of SMPP-IF-SPEC.v3.3 Kannel should discard the malformed PDU and issue an error response. Quote: "If the message type or the values of the fields are incorrect an error code indicating this will be returned in the response message to the originator. A table of error and status codes can be found in Section 7.1." Also including a NULL message ID in the body is correct behaviour. See section 6.6.3.2 (sm_submit_resp). Quote: "If absent [red.: the messageID] this field must contain a single NULL byte." I am talking about SMPP v3.3 now because I happen to have those specifications at hand. But I don't expect this to have been changed in 3.4. Kind regards, Rene Kluwen Chimit -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Ian Cass Sent: dinsdag 5 oktober 2004 13:10 To: [email protected] Subject: SMPP bug? Hi, One of our customers recently asked what this message "SMPP: PDU NUL terminated string has no NUL." (smpp_pdu.c) in his Kannel log file meant. I dug through the Kannel code & found that Kannel always expects a submit_sm_resp to have a null terminated message_id field (smpp_pdu.def). SMPP v3.4 specification, section 4.4.2 (submit_sm_resp) says :- "The submit_sm_resp PDU Body is not returned if the command_status field contains a non-zero value.". Yes, amazingly, a mandatory field is actually not mandatory in some circumstances. For several years, our SMPP SMSC always returned an empty message_id (just a \0) when the submit_sm_resp header held an error, but someone pointed out that this was wrong & that I should be returning only the header. I checked some other large vendors smsc's & proved that this was actually true, so I fixed our SMSC. There's no logic in Kannel to differentiate success or non-success submit_sm_resp. I guess this is harmless. I don't actually use Kannel day to day. I assume things will carry on as normal & this is purely a warning message? -- Ian Cass