Review at  https://gerrit.osmocom.org/3424

libmsc: remove dead code in sms_route_mt_sms()

The following branch:

        if (!rc && !gsms->receiver)
                rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED;

at the end of sms_route_mt_sms() always evaluates false.

Just a bit before, in such function, we have this:

        if (!gsms->receiver) {
                ...
 #ifdef BUILD_SMPP
                ...
 #else
                ...
 #endif
                return rc;
        }

So, if there is no receiver, we just stop running code and return the RP
cause via the rc variable. Same applies to the smpp_first check under
the BUILD_SMPP ifdef (that I have removed in this snippet to keep this
commit message small).

Change-Id: Ic3502b5b169bc7a73a67fd6ff53d8b6c0dc045c8
---
M openbsc/src/libmsc/gsm_04_11.c
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/24/3424/1

diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index da4460c..7df5e64 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -356,9 +356,6 @@
                break;
        }
 
-       if (!rc && !gsms->receiver)
-               rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED;
-
        return rc;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/3424
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3502b5b169bc7a73a67fd6ff53d8b6c0dc045c8
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pablo Neira Ayuso <pa...@gnumonks.org>

Reply via email to