From 8076c87c6b79af008511d20534edfed0eb9eb1b7 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 19 Dec 2016 19:41:28 +0100 Subject: Fix broken compilation The compilation with newver libosmocore was broken due to introduction of DLGSUP define there. Fix it by renaming DLGSUP -> DGSUP. --- osmo-gsup-hlr/src/gsup_server.c | 17 +++++++++-------- osmo-gsup-hlr/src/logging.c | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/osmo-gsup-hlr/src/gsup_server.c b/osmo-gsup-hlr/src/gsup_server.c index 7d4c07d..d8874eb 100644 --- a/osmo-gsup-hlr/src/gsup_server.c +++ b/osmo-gsup-hlr/src/gsup_server.c @@ -25,6 +25,7 @@ #include #include +#include "logging.h" #include "gsup_server.h" static void osmo_gsup_server_send(struct osmo_gsup_conn *conn, @@ -86,13 +87,13 @@ static int osmo_gsup_server_read_cb(struct ipa_server_conn *conn, } if (hh->proto != IPAC_PROTO_OSMO) { - LOGP(DLGSUP, LOGL_NOTICE, "Unsupported IPA stream ID 0x%02x\n", + LOGP(DGSUP, LOGL_NOTICE, "Unsupported IPA stream ID 0x%02x\n", hh->proto); goto invalid; } if (!he || msgb_l2len(msg) < sizeof(*he)) { - LOGP(DLGSUP, LOGL_NOTICE, "short IPA message\n"); + LOGP(DGSUP, LOGL_NOTICE, "short IPA message\n"); goto invalid; } @@ -106,7 +107,7 @@ static int osmo_gsup_server_read_cb(struct ipa_server_conn *conn, return osmo_gsup_conn_oap_handle(clnt, msg); /* osmo_gsup_client_oap_handle frees msg */ } else { - LOGP(DLGSUP, LOGL_NOTICE, "Unsupported IPA Osmo Proto 0x%02x\n", + LOGP(DGSUP, LOGL_NOTICE, "Unsupported IPA Osmo Proto 0x%02x\n", hh->proto); goto invalid; } @@ -114,7 +115,7 @@ static int osmo_gsup_server_read_cb(struct ipa_server_conn *conn, return 0; invalid: - LOGP(DLGSUP, LOGL_NOTICE, + LOGP(DGSUP, LOGL_NOTICE, "GSUP received an invalid IPA message from %s:%d: %s\n", conn->addr, conn->port, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg))); msgb_free(msg); @@ -176,12 +177,12 @@ static int osmo_gsup_server_ccm_cb(struct ipa_server_conn *conn, uint8_t *addr; size_t addr_len; - LOGP(DLGSUP, LOGL_INFO, "CCM Callback\n"); + LOGP(DGSUP, LOGL_INFO, "CCM Callback\n"); /* FIXME: should this be parrt of ipas_server handling, not * GSUP? */ tlvp_copy(clnt, &clnt->ccm, tlvp); - osmo_tlvp_dump(tlvp, DLGSUP, LOGL_INFO); + osmo_tlvp_dump(tlvp, DGSUP, LOGL_INFO); addr_len = osmo_gsup_conn_ccm_get(clnt, &addr, IPAC_IDTAG_SERNR); if (addr_len) @@ -194,7 +195,7 @@ static int osmo_gsup_server_closed_cb(struct ipa_server_conn *conn) { struct osmo_gsup_conn *clnt = (struct osmo_gsup_conn *)conn->data; - LOGP(DLGSUP, LOGL_INFO, "Lost GSUP client %s:%d\n", + LOGP(DGSUP, LOGL_INFO, "Lost GSUP client %s:%d\n", conn->addr, conn->port); gsup_route_del_conn(clnt); @@ -225,7 +226,7 @@ static int osmo_gsup_server_accept_cb(struct ipa_server_link *link, int fd) conn->server = gsups; llist_add_tail(&conn->list, &gsups->clients); - LOGP(DLGSUP, LOGL_INFO, "New GSUP client %s:%d\n", + LOGP(DGSUP, LOGL_INFO, "New GSUP client %s:%d\n", conn->conn->addr, conn->conn->port); /* request the identity of the client */ diff --git a/osmo-gsup-hlr/src/logging.c b/osmo-gsup-hlr/src/logging.c index 54c8900..0c5d03b 100644 --- a/osmo-gsup-hlr/src/logging.c +++ b/osmo-gsup-hlr/src/logging.c @@ -1,4 +1,5 @@ #include +#include #include "logging.h" const struct log_info_cat hlr_log_info_cat[] = { @@ -13,8 +14,8 @@ const struct log_info_cat hlr_log_info_cat[] = { .color = "\033[1;31m", .enabled = 1, .loglevel = LOGL_DEBUG, }, - [DLGSUP] = { - .name = "DLGSUP", + [DGSUP] = { + .name = "DGSUP", .description = "GSUP Protocol", .color = "\033[1;32m", .enabled = 1, .loglevel = LOGL_INFO, -- cgit v1.2.3