SMPP: don't get stuck in case of SMS memory exceeded

If the MS memory for SMS is exceeded and we get an RP-layer error, we
need to report that back to the (transaction-mode) ESME.  Otherwise the
ESME will wait forever after sending a SUBMIT-SM without ever receiving
a response to it.

Thanks to Holger for catching this.
This commit is contained in:
Harald Welte 2013-07-30 22:30:24 +08:00 committed by Holger Hans Peter Freyther
parent 14d1177735
commit 1aeb2af75d
1 changed files with 4 additions and 0 deletions

View File

@ -259,6 +259,10 @@ static int smpp_sms_cb(unsigned int subsys, unsigned int signal,
return 0;
switch (signal) {
case S_SMS_MEM_EXCEEDED:
/* fall-through: There is no ESME_Rxxx result code to
* indicate a MEMORY EXCEEDED in transaction mode back
* to the ESME */
case S_SMS_UNKNOWN_ERROR:
if (sms->smpp.transaction_mode) {
/* Send back the SUBMIT-SM response with apropriate error */