aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-cscn
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-01-28 15:04:56 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:09 +0100
commitb6769b99deb471dc7cb5d26b4d145e42ed7478e1 (patch)
treee4c64ac7b1dfb92b7c78b3137900b89599f5db8e /openbsc/src/osmo-cscn
parent39daffd7a5602816bd10130e1c93f213ab46315b (diff)
cosmetics: link_id=42, s/Iu-CS/IuCS, debug logs.
Until I get the proper link id from the SUA SAP, make sure we recognise it as hardcoded by setting it to 42.
Diffstat (limited to 'openbsc/src/osmo-cscn')
-rw-r--r--openbsc/src/osmo-cscn/cscn_main.c2
-rw-r--r--openbsc/src/osmo-cscn/iu_cs.c18
2 files changed, 16 insertions, 4 deletions
diff --git a/openbsc/src/osmo-cscn/cscn_main.c b/openbsc/src/osmo-cscn/cscn_main.c
index 5aa327523..ca1c48f48 100644
--- a/openbsc/src/osmo-cscn/cscn_main.c
+++ b/openbsc/src/osmo-cscn/cscn_main.c
@@ -263,7 +263,7 @@ static int rcvmsg_iu_cs(struct msgb *msg, struct gprs_ra_id *ra_id, /* FIXME gpr
DEBUGP(DIUCS, "got Iu-CS message\n");
DEBUGP(DIUCS, "Iu-CS message is %s\n",
osmo_hexdump(msg->data, msg->len));
- uint8_t link_id = 1; /* TODO proper link_id */
+ uint8_t link_id = 42; /* TODO proper link_id */
return gsm0408_rcvmsg_iucs(bsc_gsmnet, msg, link_id);
}
diff --git a/openbsc/src/osmo-cscn/iu_cs.c b/openbsc/src/osmo-cscn/iu_cs.c
index e3f22af25..7928a7f69 100644
--- a/openbsc/src/osmo-cscn/iu_cs.c
+++ b/openbsc/src/osmo-cscn/iu_cs.c
@@ -1,3 +1,8 @@
+#include <inttypes.h>
+
+#include <osmocom/core/logging.h>
+#include <openbsc/debug.h>
+
#include <openbsc/gsm_data.h>
#include <openbsc/iu.h>
@@ -12,6 +17,9 @@ struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *ne
{
struct gsm_subscriber_connection *conn;
+ DEBUGP(DIUCS, "Allocating IuCS subscriber conn: link_id %" PRIx8 ", conn_id %" PRIx32 "\n",
+ link_id, conn_id);
+
conn = talloc_zero(network, struct gsm_subscriber_connection);
if (!conn)
return NULL;
@@ -24,7 +32,7 @@ struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *ne
return conn;
}
-/* Return an existing Iu-CS subscriber connection record for the given link and
+/* Return an existing IuCS subscriber connection record for the given link and
* connection IDs, or return NULL if not found. */
static struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network,
uint8_t link_id,
@@ -38,12 +46,16 @@ static struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_networ
continue;
if (conn->iu.conn_id != conn_id)
continue;
+ DEBUGP(DIUCS, "Found IuCS subscriber for link_id %" PRIx8 ", conn_id %" PRIx32 "\n",
+ link_id, conn_id);
return conn;
}
+ DEBUGP(DIUCS, "No IuCS subscriber found for link_id %" PRIx8 ", conn_id %" PRIx32 "\n",
+ link_id, conn_id);
return NULL;
}
-/* Receive MM/CC/... message from Iu-CS (SCCP user SAP).
+/* Receive MM/CC/... message from IuCS (SCCP user SAP).
* msg->dst must reference a struct ue_conn_ctx. link_id identifies the SCTP
* peer that sent the msg.
*
@@ -64,7 +76,7 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint8_t l
/* if we already have a connection, handle DTAP.
gsm0408_dispatch() is aka msc_dtap() */
- /* Make sure we don't receive RR over Iu-CS; otherwise all
+ /* Make sure we don't receive RR over IuCS; otherwise all
* messages handled by gsm0408_dispatch() are of interest (CC,
* MM, SMS, NS_SS, maybe even MM_GPRS and SM_GPRS). */
struct gsm48_hdr *gh = msgb_l3(msg);