fix: DLGSUP logging category "unusable"

All DL* categories are typically negative, but DLGSUP isn't, and it's also not
in libosmocore's internal_cat array.
See: 3b6fb0880c

This means that a program using DLGSUP has to include DLGSUP in its own logging
cat array (typically not needed for DL* categories), which means for osmo-nitb
that DLGSUP (11) replaces DMGCP (also 11), and DMGCP becomes unusable.

Fix this: make DLGSUP -11 and include in internal_cat.

In gsup_test.c, no longer add DLGSUP to the logging categories array.

External follow-ups are otherwise needed only in osmo-hlr.git and some pending
patches for openbsc (Id3938267fa062e1a997d3704cd678874306f86ee).

Change-Id: Id974c7be158e4d60421a98110f5c807aefd31119
This commit is contained in:
Neels Hofmeyr 2016-12-10 17:01:06 +01:00
parent fd9ec3bc7d
commit 9795cf1b12
3 changed files with 6 additions and 6 deletions

View File

@ -92,7 +92,7 @@ void logp(int subsys, const char *file, int line, int cont, const char *format,
#define DLCTRL -8 /*!< Control Interface */
#define DLGTP -9 /*!< GTP (GPRS Tunneling Protocol */
#define DLSTATS -10 /*!< Statistics */
#define DLGSUP 11 /*!< Generic Subscriber Update Protocol */
#define DLGSUP -11 /*!< Generic Subscriber Update Protocol */
#define OSMO_NUM_DLIB 11 /*!< Number of logging sub-systems in libraries */
/*! Configuration of singgle log category / sub-system */

View File

@ -123,6 +123,11 @@ static const struct log_info_cat internal_cat[OSMO_NUM_DLIB] = {
.description = "Statistics messages and logging",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
[INT2IDX(DLGSUP)] = {
.name = "DLGSUP",
.description = "Generic Subscriber Update Protocol",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
};
/*! \brief descriptive string for each log level */

View File

@ -241,11 +241,6 @@ static void test_gsup_messages_dec_enc(void)
}
const struct log_info_cat default_categories[] = {
[DLGSUP] = {
.name = "DLGSUP",
.description = "Generic Subscriber Update Protocol",
.enabled = 0, .loglevel = LOGL_DEBUG,
},
};
static struct log_info info = {