Fix broken compilation
The compilation with newver libosmocore was broken due to introduction of DLGSUP define there. Fix it by renaming DLGSUP -> DGSUP.
This commit is contained in:
parent
50d7a8ef60
commit
8076c87c6b
|
@ -25,6 +25,7 @@
|
||||||
#include <osmocom/abis/ipa.h>
|
#include <osmocom/abis/ipa.h>
|
||||||
#include <osmocom/abis/ipaccess.h>
|
#include <osmocom/abis/ipaccess.h>
|
||||||
|
|
||||||
|
#include "logging.h"
|
||||||
#include "gsup_server.h"
|
#include "gsup_server.h"
|
||||||
|
|
||||||
static void osmo_gsup_server_send(struct osmo_gsup_conn *conn,
|
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) {
|
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);
|
hh->proto);
|
||||||
goto invalid;
|
goto invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!he || msgb_l2len(msg) < sizeof(*he)) {
|
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;
|
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);
|
return osmo_gsup_conn_oap_handle(clnt, msg);
|
||||||
/* osmo_gsup_client_oap_handle frees msg */
|
/* osmo_gsup_client_oap_handle frees msg */
|
||||||
} else {
|
} 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);
|
hh->proto);
|
||||||
goto invalid;
|
goto invalid;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +115,7 @@ static int osmo_gsup_server_read_cb(struct ipa_server_conn *conn,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
invalid:
|
invalid:
|
||||||
LOGP(DLGSUP, LOGL_NOTICE,
|
LOGP(DGSUP, LOGL_NOTICE,
|
||||||
"GSUP received an invalid IPA message from %s:%d: %s\n",
|
"GSUP received an invalid IPA message from %s:%d: %s\n",
|
||||||
conn->addr, conn->port, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
|
conn->addr, conn->port, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
|
||||||
msgb_free(msg);
|
msgb_free(msg);
|
||||||
|
@ -176,12 +177,12 @@ static int osmo_gsup_server_ccm_cb(struct ipa_server_conn *conn,
|
||||||
uint8_t *addr;
|
uint8_t *addr;
|
||||||
size_t addr_len;
|
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
|
/* FIXME: should this be parrt of ipas_server handling, not
|
||||||
* GSUP? */
|
* GSUP? */
|
||||||
tlvp_copy(clnt, &clnt->ccm, tlvp);
|
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);
|
addr_len = osmo_gsup_conn_ccm_get(clnt, &addr, IPAC_IDTAG_SERNR);
|
||||||
if (addr_len)
|
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;
|
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);
|
conn->addr, conn->port);
|
||||||
|
|
||||||
gsup_route_del_conn(clnt);
|
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;
|
conn->server = gsups;
|
||||||
llist_add_tail(&conn->list, &gsups->clients);
|
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);
|
conn->conn->addr, conn->conn->port);
|
||||||
|
|
||||||
/* request the identity of the client */
|
/* request the identity of the client */
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <osmocom/core/utils.h>
|
#include <osmocom/core/utils.h>
|
||||||
|
#include <osmocom/core/logging.h>
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
|
||||||
const struct log_info_cat hlr_log_info_cat[] = {
|
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",
|
.color = "\033[1;31m",
|
||||||
.enabled = 1, .loglevel = LOGL_DEBUG,
|
.enabled = 1, .loglevel = LOGL_DEBUG,
|
||||||
},
|
},
|
||||||
[DLGSUP] = {
|
[DGSUP] = {
|
||||||
.name = "DLGSUP",
|
.name = "DGSUP",
|
||||||
.description = "GSUP Protocol",
|
.description = "GSUP Protocol",
|
||||||
.color = "\033[1;32m",
|
.color = "\033[1;32m",
|
||||||
.enabled = 1, .loglevel = LOGL_INFO,
|
.enabled = 1, .loglevel = LOGL_INFO,
|
||||||
|
|
Reference in New Issue