aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-12-29 18:37:45 +0100
committerHarald Welte <laforge@gnumonks.org>2014-12-30 00:24:52 +0100
commitc328371b54ad76585a6427401a02e6846d139bff (patch)
treeaca76514b422ea0a47bde43ad0618f4ec602c584
parentffcdd0da7e2e05eed4eb77bcf51861fbcf89fb5c (diff)
cbch: add debug statementsshared/31c3
-rw-r--r--src/common/cbch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/cbch.c b/src/common/cbch.c
index 22a6df5..07a8ead 100644
--- a/src/common/cbch.c
+++ b/src/common/cbch.c
@@ -24,6 +24,7 @@
#include <osmo-bts/bts.h>
#include <osmo-bts/cbch.h>
+#include <osmo-bts/logging.h>
#define SMS_CB_MSG_LEN 88 /* TS 04.12 Section 3.1 */
#define SMS_CB_BLOCK_LEN 22 /* TS 04.12 Section 3.1 */
@@ -64,6 +65,8 @@ static int get_smscb_block(struct gsm_bts *bts, uint8_t *out)
return 0;
}
+ DEBUGP(DLSMS, "Current SMS-CB %s: ",
+ osmo_hexdump_nospc(msg->msg, sizeof(msg->msg)));
/* determine how much data to copy */
to_copy = SMS_CB_MSG_LEN - (msg->next_seg * SMS_CB_BLOCK_LEN);
if (to_copy > SMS_CB_BLOCK_LEN)
@@ -75,6 +78,9 @@ static int get_smscb_block(struct gsm_bts *bts, uint8_t *out)
/* set + increment sequence number */
block_type->seq_nr = msg->next_seg++;
+ DEBUGP(DLSMS, "sending block %u: %s\n",
+ block_type->seq_nr, osmo_hexdump_nospc(out, to_copy));
+
/* determine if this is the last block */
if (block_type->seq_nr + 1 == msg->num_segs)
block_type->lb = 1;
@@ -134,6 +140,8 @@ int bts_process_smscb_cmd(struct gsm_bts *bts,
break;
}
+ DEBUGP(DLSMS, "Enqueuing SMS-CB %s from RSL",
+ osmo_hexdump_nospc(scm->msg, sizeof(scm->msg)));
llist_add_tail(&scm->list, &btsb->smscb_state.queue);
return 0;