openbsc[master]: libmsc: Either route report to ESME or send it, not both

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat Sep 9 01:39:43 UTC 2017


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/3885/1/openbsc/src/libmsc/gsm_04_11.c
File openbsc/src/libmsc/gsm_04_11.c:

Line 693: 	if (rc == 0) {
> Pablo, I'm not sure how you would like to make this test here.
Took a brief look at the code which I don't know well, and at it looks such that we should only go on to deliver below in case of GSM411_RP_CAUSE_MO_NUM_UNASSIGNED. In all other GSM411_RP_CAUSE cases it appears we wanted to do external SMPP but it failed, and thus we should sms_free(sms_report) and return, logging that routing to ESME failed.

Shouldn't the above rc < 0 also sms_free(sms_report) and return for the same reason?

But please don't take my word for it, would prefer if e.g. Pablo could confirm.

What I do notice for sure: in sms_route_mt_sms(), if built without SMPP support, the rc returned is *undefined* when gsms->receiver is present. This is bound to fail and needs a separate fix. Before this patch, the rc had no functional effect apart from the log message above, but after this patch we will randomly state that the report was routed to the ESME and drop it, even though SMPP support is not even enabled -- same would happen if sms_route_mt_sms() were fixed to initialize rc = 0  :)

libmsc/gsm_04_11.c

  static int sms_route_mt_sms(struct gsm_subscriber_connection *conn,
                            struct gsm_sms *gsms)
  {
        int rc; <-- unset

  #ifdef BUILD_SMPP
        ...
  #endif

        /* determine gsms->receiver based on dialled number */
        gsms->receiver = vlr_subscr_find_by_msisdn(conn->network->vlr,
                                                   gsms->dst.addr);
        if (!gsms->receiver) {
                ...
        }

        return rc; <-- returned
  }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e86a34f5d3087c9c25479192d9a690922113da2
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pablo Neira Ayuso <pablo at gnumonks.org>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list