summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2010-04-26 11:21:18 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2010-04-26 11:21:18 +0200
commit9ef7ac8b118f20eddd811561a4fb3ca4e9f2e054 (patch)
tree3b4f16da312b1b011ca5dec41a605e25795b81db /src
parentf1278ad9da228145925fd613d28c082dbf2806d6 (diff)
Added some debugging. / Minor condition fix.
Diffstat (limited to 'src')
-rw-r--r--src/host/layer23/include/osmocom/logging.h1
-rwxr-xr-xsrc/host/layer23/src/gsm322.c2
-rw-r--r--src/host/layer23/src/gsm48_cc.c4
-rw-r--r--src/host/layer23/src/gsm48_mm.c6
-rw-r--r--src/host/layer23/src/gsm48_rr.c4
-rw-r--r--src/host/layer23/src/logging.c18
-rw-r--r--src/host/layer23/src/mnccms.c2
7 files changed, 35 insertions, 2 deletions
diff --git a/src/host/layer23/include/osmocom/logging.h b/src/host/layer23/include/osmocom/logging.h
index e90d5425..d7360e2c 100644
--- a/src/host/layer23/include/osmocom/logging.h
+++ b/src/host/layer23/include/osmocom/logging.h
@@ -12,6 +12,7 @@ enum {
DMM,
DCC,
DSMS,
+ DMNCC,
DMEAS,
DPAG,
DLAPDM,
diff --git a/src/host/layer23/src/gsm322.c b/src/host/layer23/src/gsm322.c
index 034a759f..7e43f758 100755
--- a/src/host/layer23/src/gsm322.c
+++ b/src/host/layer23/src/gsm322.c
@@ -783,7 +783,7 @@ static int gsm322_a_sel_first_plmn(struct osmocom_ms *ms, struct msgb *msg)
plmn->plmn_curr = i;
/* if no PLMN in list */
- if (plmn_first) {
+ if (!plmn_first) {
LOGP(DPLMN, LOGL_INFO, "No PLMN in list.\n");
gsm322_a_no_more_plmn(ms, msg);
diff --git a/src/host/layer23/src/gsm48_cc.c b/src/host/layer23/src/gsm48_cc.c
index e79c51a9..9308ed8d 100644
--- a/src/host/layer23/src/gsm48_cc.c
+++ b/src/host/layer23/src/gsm48_cc.c
@@ -55,6 +55,8 @@ int gsm48_cc_init(struct osmocom_ms *ms)
cc->ms = ms;
+ LOGP(DCC, LOGL_INFO, "init Call Control process\n");
+
INIT_LLIST_HEAD(&cc->mncc_upqueue);
return 0;
@@ -66,6 +68,8 @@ int gsm48_cc_exit(struct osmocom_ms *ms)
struct gsm_trans *trans, *trans2;
struct msgb *msg;
+ LOGP(DCC, LOGL_INFO, "exit Call Control process\n");
+
llist_for_each_entry_safe(trans, trans2, &ms->trans_list, entry) {
if (trans->protocol == GSM48_PDISC_CC)
trans_free(trans);
diff --git a/src/host/layer23/src/gsm48_mm.c b/src/host/layer23/src/gsm48_mm.c
index 9e711e8a..8b77523d 100644
--- a/src/host/layer23/src/gsm48_mm.c
+++ b/src/host/layer23/src/gsm48_mm.c
@@ -840,6 +840,8 @@ int gsm48_mm_init(struct osmocom_ms *ms)
memset(mm, 0, sizeof(*mm));
mm->ms = ms;
+ LOGP(DMM, LOGL_INFO, "init Mobility Management process\n");
+
/* 4.2.1.1 */
mm->state = GSM48_MM_ST_MM_IDLE;
mm->substate = GSM48_MM_SST_PLMN_SEARCH;
@@ -861,6 +863,8 @@ int gsm48_mm_exit(struct osmocom_ms *ms)
struct gsm48_mm_conn *conn;
struct msgb *msg;
+ LOGP(DMM, LOGL_INFO, "exit Mobility Management process\n");
+
/* flush lists */
while (!llist_empty(&mm->mm_conn)) {
conn = llist_entry(mm->mm_conn.next,
@@ -3381,7 +3385,7 @@ static int gsm48_rcv_mmr(struct osmocom_ms *ms, struct msgb *msg)
int msg_type = mmr->msg_type;
int rc = 0;
- LOGP(DMM, LOGL_INFO, "(ms %s) Received '%s' event", ms->name,
+ LOGP(DMM, LOGL_INFO, "(ms %s) Received '%s' event\n", ms->name,
get_mmr_name(msg_type));
switch(msg_type) {
case GSM48_MMR_REG_REQ:
diff --git a/src/host/layer23/src/gsm48_rr.c b/src/host/layer23/src/gsm48_rr.c
index f4ed2fcf..078e170c 100644
--- a/src/host/layer23/src/gsm48_rr.c
+++ b/src/host/layer23/src/gsm48_rr.c
@@ -3093,6 +3093,8 @@ int gsm48_rr_init(struct osmocom_ms *ms)
memset(rr, 0, sizeof(*rr));
rr->ms = ms;
+ LOGP(DRR, LOGL_INFO, "init Radio Ressource process\n");
+
INIT_LLIST_HEAD(&rr->rsl_upqueue);
INIT_LLIST_HEAD(&rr->downqueue);
/* downqueue is handled here, so don't add_work */
@@ -3107,6 +3109,8 @@ int gsm48_rr_exit(struct osmocom_ms *ms)
struct gsm48_rrlayer *rr = &ms->rrlayer;
struct msgb *msg;
+ LOGP(DRR, LOGL_INFO, "exit Radio Ressource process\n");
+
/* flush queues */
while ((msg = msgb_dequeue(&rr->rsl_upqueue)))
msgb_free(msg);
diff --git a/src/host/layer23/src/logging.c b/src/host/layer23/src/logging.c
index f2642ce7..998a6295 100644
--- a/src/host/layer23/src/logging.c
+++ b/src/host/layer23/src/logging.c
@@ -50,12 +50,30 @@ static const struct log_info_cat default_categories[] = {
.color = "\033[1;32m",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
+ [DCS] = {
+ .name = "DCS",
+ .description = "Cell Selection",
+ .color = "\033[1;34m",
+ .enabled = 1, .loglevel = LOGL_DEBUG,
+ },
+ [DPLMN] = {
+ .name = "DPLMN",
+ .description = "PLMN Search",
+ .color = "\033[1;33m",
+ .enabled = 1, .loglevel = LOGL_DEBUG,
+ },
[DSMS] = {
.name = "DSMS",
.description = "Short Message Service",
.color = "\033[1;37m",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
+ [DMNCC] = {
+ .name = "DMNCC",
+ .description = "Mobile Network Call Control",
+ .color = "\033[1;37m",
+ .enabled = 1, .loglevel = LOGL_DEBUG,
+ },
[DMEAS] = {
.name = "DMEAS",
.description = "MEasurement Reporting",
diff --git a/src/host/layer23/src/mnccms.c b/src/host/layer23/src/mnccms.c
index d2ee8a57..60afe6e1 100644
--- a/src/host/layer23/src/mnccms.c
+++ b/src/host/layer23/src/mnccms.c
@@ -48,6 +48,8 @@ int mncc_recv_dummy(struct osmocom_ms *ms, int msg_type, void *arg)
int callref = data->callref;
struct gsm_mncc rel;
+ LOGP(DMNCC, LOGL_INFO, "Rejecting incomming call\n");
+
/* reject, as we don't support Calls */
memset(&rel, 0, sizeof(struct gsm_mncc));
rel.callref = callref;