Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13942


Change subject: add DUSSD logging category
......................................................................

add DUSSD logging category

Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0
---
M include/osmocom/msc/debug.h
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_09_11.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_tests.c
6 files changed, 23 insertions(+), 17 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/42/13942/1

diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h
index 28ba482..8802360 100644
--- a/include/osmocom/msc/debug.h
+++ b/include/osmocom/msc/debug.h
@@ -22,5 +22,6 @@
        DIUCS,
        DBSSAP,
        DSGS,
+       DUSSD,
        Debug_LastEntry,
 };
diff --git a/include/osmocom/msc/transaction.h 
b/include/osmocom/msc/transaction.h
index 6b82390..bd20153 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -168,10 +168,7 @@
        case TRANS_SMS:
                return DLSMS;
        case TRANS_USSD:
-               /* FIXME: traditionally (before LOG_TRANS() was added in 
I2e60964d7a3c06d051debd1c707051a0eb3101ba /
-                * ff7074a0c7b62025473d8f1a950905ac2cb2f31c), all USSD logging 
happened on DMM. Instead, it probably
-                * deserves its own logging subsystem. */
-               return DMM;
+               return DUSSD;
        default:
                break;
        }
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 984cc53..b211641 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -271,7 +271,7 @@

        if (msc_a) {
                struct gsm_network *net = msc_a_net(msc_a);
-               LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging succeeded\n");
+               LOG_MSC_A_CAT(msc_a, DUSSD, LOGL_DEBUG, "Paging succeeded\n");

                /* Assign connection */
                msc_a_get(msc_a, MSC_A_USE_NC_SS);
@@ -297,7 +297,7 @@
                /* Count established network-initiated NC SS/USSD sessions */
                rate_ctr_inc(&net->msc_ctrs->ctr[MSC_CTR_NC_SS_MT_ESTABLISHED]);
        } else {
-               LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging expired\n");
+               LOG_MSC_A_CAT(msc_a, DUSSD, LOGL_DEBUG, "Paging expired\n");

                /* TODO: inform HLR about this failure */

diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index e101d89..2c2cc26 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -480,8 +480,11 @@
                .description = "SGs Interface (SGsAP)",
                .enabled = 1, .loglevel = LOGL_NOTICE,
        },
-
-
+       [DUSSD] = {
+               .name = "DUSSD",
+               .description = "Supplementary Services",
+               .enabled = 1, .loglevel = LOGL_NOTICE,
+       },
 };

 static int filter_fn(const struct log_context *ctx, struct log_target *tar)
diff --git a/tests/msc_vlr/msc_vlr_test_ss.err 
b/tests/msc_vlr/msc_vlr_test_ss.err
index 2030715..a409abf 100644
--- a/tests/msc_vlr/msc_vlr_test_ss.err
+++ b/tests/msc_vlr/msc_vlr_test_ss.err
@@ -173,12 +173,12 @@
 DBSSAP 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 RAN decode: DTAP
 DRLL 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 Dispatching 04.08 message: NCSS GSM0480_MTYPE_REGISTER
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 3 
(attached,active-conn,NCSS)
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New 
transaction
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) 
New transaction
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 + nc_ss: now used by 3 (cm_service_ss,rx_from_ms,nc_ss)
 DMSC 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 Received Event MSC_A_EV_TRANSACTION_ACCEPTED
 DMSC 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}:
 state_chg to MSC_A_ST_COMMUNICATING
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 - cm_service_ss: now used by 2 (rx_from_ms,nc_ss)
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER
 GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 
20010809710000004026f03004200000013101013515a11302010102013b300b04010f0406aa510c061b010a0103
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 - rx_from_ms: now used by 1 (nc_ss)
 <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 
20010809710000004026f03004200000013101033527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103
@@ -187,7 +187,7 @@
 - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 
8b2a1c27a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d
 - DTAP matches expected message
 DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){0}: 
Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x20000001 tid-8) Freeing transaction
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ 
callref-0x20000001 tid-8) Freeing transaction
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 3 
(attached,active-conn,gsm0911_gsup_rx)
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 - nc_ss: now used by 0 (-)
 DMSC 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 Received Event MSC_A_EV_UNUSED
@@ -366,9 +366,9 @@
 <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 
20010809710000004026f03004200001013101013515a11302010102013b300b04010f0406aa510c061b010a0103
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + gsm0911_gsup_rx: now used 
by 3 (attached,_test_ss_ussd_no,gsm0911_gsup_rx)
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 4 
(attached,_test_ss_ussd_no,gsm0911_gsup_rx,NCSS)
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) 
New transaction
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) 
Establishing network-originated session
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) 
Triggering Paging Request
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) 
New transaction
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) 
Establishing network-originated session
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) 
Triggering Paging Request
 DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Starting 
paging
   paging request (SIGNALLING_HIGH_PRIO) to IMSI-901700000004620:MSISDN-46071 
on GERAN-A
   strcmp(paging_expecting_imsi, vsub->imsi) == 0
@@ -417,7 +417,7 @@
 DMSC 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTH_CIPH}:
 state_chg to MSC_A_ST_AUTHENTICATED
 DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Paging 
Response action (success)
 DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Removing 
Paging Request
-DMM 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 Paging succeeded
+DUSSD 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 Paging succeeded
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 + nc_ss: now used by 3 (rx_from_ms,paging-response,nc_ss)
 DMSC 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 RAN encode: DTAP on GERAN-A
 - DTAP --GERAN-A--> MS: GSM0480_MTYPE_REGISTER: 
0b3b1c15a11302010102013b300b04010f0406aa510c061b01
@@ -433,7 +433,7 @@
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 + rx_from_ms: now used by 2 (nc_ss,rx_from_ms)
 DBSSAP 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 RAN decode: DTAP
 DRLL 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 Dispatching 04.08 message: NCSS GSM0480_MTYPE_FACILITY
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP 
callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP 
callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY
 GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 
20010809710000004026f03004200001013101023527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 - rx_from_ms: now used by 1 (nc_ss)
   dtap_tx_confirmed == 1
@@ -444,7 +444,7 @@
 - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 0b2a
 - DTAP matches expected message
 DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){0}: 
Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
-DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP 
callref-0x20000101 tid-0) Freeing transaction
+DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP 
callref-0x20000101 tid-0) Freeing transaction
 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 4 
(attached,2*gsm0911_gsup_rx,active-conn)
 DREF 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 - nc_ss: now used by 0 (-)
 DMSC 
msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 Received Event MSC_A_EV_UNUSED
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 81ac3f7..6805d3a 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -660,6 +660,11 @@
                .description = "BSSAP Protocol (A Interface)",
                .enabled = 1, .loglevel = LOGL_DEBUG,
        },
+       [DUSSD] = {
+               .name = "DUSSD",
+               .description = "Supplementary Services",
+               .enabled = 1, .loglevel = LOGL_DEBUG,
+       },
 };

 static struct log_info info = {

--
To view, visit https://gerrit.osmocom.org/13942
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0
Gerrit-Change-Number: 13942
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>

Reply via email to