From 1aeb2af75d27fdb4ab31d145ec49e84e29ecd501 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 30 Jul 2013 22:30:24 +0800 Subject: [PATCH] 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. --- openbsc/src/libmsc/smpp_openbsc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index 8e0085d0c..eb1ac11b7 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -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 */