aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gsup_client.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-08 21:28:29 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-13 14:54:01 +0000
commitef022783c37c459d0ccb5aa6f165d4d4dc6c0815 (patch)
tree1286419cf8a301129b8f327c5035d5dd6d18e8a1 /openbsc/src/gprs/gprs_gsup_client.c
parenteaaee92db5f29fa280ad89ef8b89d9062abcfa48 (diff)
gsup client, gsup_test_client: move logging to DLGSUP category
Use the DLGSUP logging category for GSUP. Bump the required version of libosmocore to 0.9.5 to benefit from the DLGSUP logging category fix in core/logging.[hc]. (Id974c7be158e4d60421a98110f5c807aefd31119) Todo: we're using a "Library" logging category, which is not really what the library category was intended for. Instead, the GSUP client should probably be given a logging category like DVLR or DGPRS in its initialization API. Related: OS#1592 Change-Id: Id3938267fa062e1a997d3704cd678874306f86ee
Diffstat (limited to 'openbsc/src/gprs/gprs_gsup_client.c')
-rw-r--r--openbsc/src/gprs/gprs_gsup_client.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/openbsc/src/gprs/gprs_gsup_client.c b/openbsc/src/gprs/gprs_gsup_client.c
index 6195fa675..b99156371 100644
--- a/openbsc/src/gprs/gprs_gsup_client.c
+++ b/openbsc/src/gprs/gprs_gsup_client.c
@@ -55,29 +55,29 @@ static int gsup_client_connect(struct gsup_client *gsupc)
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 @@ static int gsup_client_connect(struct gsup_client *gsupc)
osmo_timer_schedule(&gsupc->connect_timer,
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;
@@ -119,7 +119,7 @@ static void gsup_client_oap_register(struct gsup_client *gsupc)
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;
}
@@ -130,7 +130,7 @@ static void gsup_client_updown_cb(struct ipa_client_conn *link, int up)
{
struct 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;
@@ -181,7 +181,7 @@ static int gsup_client_read_cb(struct ipa_client_conn *link, struct msgb *msg)
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 */
@@ -194,7 +194,7 @@ static int gsup_client_read_cb(struct ipa_client_conn *link, struct msgb *msg)
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;
}
@@ -223,7 +223,7 @@ static int gsup_client_read_cb(struct ipa_client_conn *link, struct msgb *msg)
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));
@@ -235,7 +235,7 @@ static void ping_timer_cb(void *gsupc_)
{
struct 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");
@@ -244,7 +244,7 @@ static void ping_timer_cb(void *gsupc_)
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 @@ static void start_test_procedure(struct gsup_client *gsupc)
gsupc->got_ipa_pong = 0;
osmo_timer_schedule(&gsupc->ping_timer, GSUP_CLIENT_PING_INTERVAL, 0);
- LOGP(DGPRS, LOGL_DEBUG, "GSUP sending PING\n");
+ LOGP(DLGSUP, LOGL_DEBUG, "GSUP sending PING\n");
gsup_client_send_ping(gsupc);
}