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.orgReview at https://gerrit.osmocom.org/1386 gsup client, gsup_test_client: move logging to DLGSUP category Since recently, libosmocore offers the DLGSUP logging category. Use it for GSUP. Change-Id: Id3938267fa062e1a997d3704cd678874306f86ee --- M openbsc/src/gprs/gprs_gsup_client.c M openbsc/src/gprs/gsup_test_client.c 2 files changed, 22 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/86/1386/1 diff --git a/openbsc/src/gprs/gprs_gsup_client.c b/openbsc/src/gprs/gprs_gsup_client.c index bd1a16b..c8e7abd 100644 --- a/openbsc/src/gprs/gprs_gsup_client.c +++ b/openbsc/src/gprs/gprs_gsup_client.c @@ -55,29 +55,29 @@ return 0; if (osmo_timer_pending(&gsupc->connect_timer)) { - LOGP(DLINP, LOGL_DEBUG, + LOGP(DLGSUP, LOGL_DEBUG, "GSUP connect: connect timer already running\n"); osmo_timer_del(&gsupc->connect_timer); } if (osmo_timer_pending(&gsupc->ping_timer)) { - LOGP(DLINP, LOGL_DEBUG, + LOGP(DLGSUP, LOGL_DEBUG, "GSUP connect: ping timer already running\n"); osmo_timer_del(&gsupc->ping_timer); } if (ipa_client_conn_clear_queue(gsupc->link) > 0) - LOGP(DLINP, LOGL_DEBUG, "GSUP connect: discarded stored messages\n"); + LOGP(DLGSUP, LOGL_DEBUG, "GSUP connect: discarded stored messages\n"); rc = ipa_client_conn_open(gsupc->link); if (rc >= 0) { - LOGP(DGPRS, LOGL_INFO, "GSUP connecting to %s:%d\n", + LOGP(DLGSUP, LOGL_INFO, "GSUP connecting to %s:%d\n", gsupc->link->addr, gsupc->link->port); return 0; } - LOGP(DGPRS, LOGL_INFO, "GSUP failed to connect to %s:%d: %s\n", + LOGP(DLGSUP, LOGL_INFO, "GSUP failed to connect to %s:%d: %s\n", gsupc->link->addr, gsupc->link->port, strerror(-rc)); if (rc == -EBADF || rc == -ENOTSOCK || rc == -EAFNOSUPPORT || @@ -87,7 +87,7 @@ osmo_timer_schedule(&gsupc->connect_timer, OSMO_GSUP_CLIENT_RECONNECT_INTERVAL, 0); - LOGP(DGPRS, LOGL_INFO, "Scheduled timer to retry GSUP connect to %s:%d\n", + LOGP(DLGSUP, LOGL_INFO, "Scheduled timer to retry GSUP connect to %s:%d\n", gsupc->link->addr, gsupc->link->port); return 0; @@ -118,7 +118,7 @@ rc = oap_register(&gsupc->oap_state, &msg_tx); if ((rc < 0) || (!msg_tx)) { - LOGP(DGPRS, LOGL_ERROR, "GSUP OAP set up, but cannot register.\n"); + LOGP(DLGSUP, LOGL_ERROR, "GSUP OAP set up, but cannot register.\n"); return; } @@ -129,7 +129,7 @@ { struct osmo_gsup_client *gsupc = link->data; - LOGP(DGPRS, LOGL_INFO, "GSUP link to %s:%d %s\n", + LOGP(DLGSUP, LOGL_INFO, "GSUP link to %s:%d %s\n", link->addr, link->port, up ? "UP" : "DOWN"); gsupc->is_connected = up; @@ -180,7 +180,7 @@ rc = ipaccess_bts_handle_ccm(link, &ipa_dev, msg); if (rc < 0) { - LOGP(DGPRS, LOGL_NOTICE, + LOGP(DLGSUP, LOGL_NOTICE, "GSUP received an invalid IPA/CCM message from %s:%d\n", link->addr, link->port); /* Link has been closed */ @@ -193,7 +193,7 @@ uint8_t msg_type = *(msg->l2h); /* CCM message */ if (msg_type == IPAC_MSGT_PONG) { - LOGP(DGPRS, LOGL_DEBUG, "GSUP receiving PONG\n"); + LOGP(DLGSUP, LOGL_DEBUG, "GSUP receiving PONG\n"); gsupc->got_ipa_pong = 1; } @@ -222,7 +222,7 @@ return 0; invalid: - LOGP(DGPRS, LOGL_NOTICE, + LOGP(DLGSUP, LOGL_NOTICE, "GSUP received an invalid IPA message from %s:%d, size = %d\n", link->addr, link->port, msgb_length(msg)); @@ -234,7 +234,7 @@ { struct osmo_gsup_client *gsupc = gsupc_; - LOGP(DGPRS, LOGL_INFO, "GSUP ping callback (%s, %s PONG)\n", + LOGP(DLGSUP, LOGL_INFO, "GSUP ping callback (%s, %s PONG)\n", gsupc->is_connected ? "connected" : "not connected", gsupc->got_ipa_pong ? "got" : "didn't get"); @@ -243,7 +243,7 @@ return; } - LOGP(DGPRS, LOGL_NOTICE, "GSUP ping timed out, reconnecting\n"); + LOGP(DLGSUP, LOGL_NOTICE, "GSUP ping timed out, reconnecting\n"); ipa_client_conn_close(gsupc->link); gsupc->is_connected = 0; @@ -258,7 +258,7 @@ gsupc->got_ipa_pong = 0; osmo_timer_schedule(&gsupc->ping_timer, OSMO_GSUP_CLIENT_PING_INTERVAL, 0); - LOGP(DGPRS, LOGL_DEBUG, "GSUP sending PING\n"); + LOGP(DLGSUP, LOGL_DEBUG, "GSUP sending PING\n"); gsupc_send_ping(gsupc); } diff --git a/openbsc/src/gprs/gsup_test_client.c b/openbsc/src/gprs/gsup_test_client.c index 843e108..e817185 100644 --- a/openbsc/src/gprs/gsup_test_client.c +++ b/openbsc/src/gprs/gsup_test_client.c @@ -260,17 +260,17 @@ void *tall_bsc_ctx = NULL; /* default categories */ -static struct log_info_cat gprs_categories[] = { - [DGPRS] = { - .name = "DGPRS", - .description = "GPRS Packet Service", +static struct log_info_cat default_categories[] = { + [DLGSUP] = { + .name = "DLGSUP", + .description = "Generic Subscriber Update Protocol", .enabled = 1, .loglevel = LOGL_INFO, }, }; -static const struct log_info gprs_log_info = { - .cat = gprs_categories, - .num_cat = ARRAY_SIZE(gprs_categories), +static const struct log_info gsup_test_client_log_info = { + .cat = default_categories, + .num_cat = ARRAY_SIZE(default_categories), }; int main(int argc, char **argv) @@ -279,7 +279,7 @@ char *server_host = "127.0.0.1"; uint16_t server_port = 2222; - osmo_init_logging(&gprs_log_info); + osmo_init_logging(&gsup_test_client_log_info); g_gc = osmo_gsup_client_create(server_host, server_port, gsupc_read_cb, NULL); -- To view, visit https://gerrit.osmocom.org/1386 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3938267fa062e1a997d3704cd678874306f86ee Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>