AW: patch 24: output

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/OpenBSC@lists.osmocom.org/.

Andreas.Eversberg Andreas.Eversberg at versatel.de
Wed Jun 3 07:41:13 UTC 2009


the reason for moving "subscr_get_by_tmsi" behind the "DEBUGPC" function is to finish the debug line (using end-of-line) before calling the "subscr_get_by_tmsi" function. the "subscr_get_by_tmsi" function may also do debug output (currently uses printf). without changing it, the debug gets distorted.

-----Ursprüngliche Nachricht-----
Von: openbsc-bounces at lists.gnumonks.org [mailto:openbsc-bounces at lists.gnumonks.org] Im Auftrag von Holger Freyther

diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index d585aae..9a2a00a 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -797,9 +797,9 @@ static int gsm48_rx_mm_serv_req(struct msgb *msg)
        }
 
        mi_to_string(mi_string, sizeof(mi_string), mi, mi_len);
-       subscr = subscr_get_by_tmsi(mi_string);
        DEBUGPC(DMM, "serv_type=0x%02x mi_type=0x%02x M(%s)\n",
                req->cm_service_type, mi_type, mi_string);
+       subscr = subscr_get_by_tmsi(mi_string);
 
        /* FIXME: if we don't know the TMSI, inquire abit IMSI and allocate 
new TMSI */
        if (!subscr)
@@ -831,9 +831,11 @@ static int gsm48_rx_mm_imsi_detach_ind(struct msgb *msg)
 
        switch (mi_type) {
        case GSM_MI_TYPE_TMSI:
+               DEBUGPC(DMM, "\n");
                subscr = subscr_get_by_tmsi(mi_string);
                break;
        case GSM_MI_TYPE_IMSI:
+               DEBUGPC(DMM, "\n");
                subscr = subscr_get_by_imsi(mi_string);
                break;
        case GSM_MI_TYPE_IMEI:






More information about the OpenBSC mailing list