Re: SMPP getting stuck

Nisan Bloch <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi
At 11:10 AM 12/5/02 +0100, Andreas Fink wrote:

>I've fixed the problem in CVS.
>the implementation didnt expect to see an error as generic_err_resp but 
>only as sms_submit_resp
>the error was a THROTTLING.
>
>

Our soln is basically the same but with some minor differences.. Primarily 
we remove the message for sequence_number from the dictionary (first), also 
we check for SMPP_ESME_RMSGQFUL. I removed the msg first before checking 
the command_status, because it may be an unknown/unhandled status, and then 
the message would remain in the dictionary. This would slowly eat away at mem.

         case generic_nack_resp:
             os = octstr_format("%ld", 
pdu->u.generic_nack_resp.sequence_number);
             msg = dict_remove(smpp->sent_msgs, os);
             octstr_destroy(os);

             if (msg == NULL) {
                 warning(0, "SMPP[%s]: SMSC sent generic_nack_resp "
                         "with wrong sequence number 0x%08lx",
                         octstr_get_cstr(smpp->conn->id),
                         pdu->u.generic_nack_resp.sequence_number);
             } else  if ((pdu->u.generic_nack_resp.command_status == 
SMPP_ESME_RTHROTTLED) ||
                     (pdu->u.generic_nack_resp.command_status == 
SMPP_ESME_RMSGQFUL)) {

                 info(0,"SMPP[%s]: ESME_RTHROTTLED/ESME_RMSGQFUL: status 
0x%08lx ",
                     octstr_get_cstr(smpp->conn->id),pdu->u.generic_nack_resp.command_status);

                 time(&(smpp->throttling_err_time));
                 reason = smpp_status_to_smscconn_failure_reason(
                                 pdu->u.generic_nack_resp.command_status);
                 bb_smscconn_send_failed(smpp->conn, msg, reason);
                 --(*pending_submits);
             } else {
                 error(0, "SMPP[%s]: NACK PDU type 0x%08lx, code 0x%08lx.",
                             octstr_get_cstr(smpp->conn->id), pdu->type,
                             pdu->u.generic_nack_resp.command_status);
                 reason = smpp_status_to_smscconn_failure_reason(-1);
                 bb_smscconn_send_failed(smpp->conn, msg, reason);
                 --(*pending_submits);
             }
         break;


Nisan
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.