From 33e8a87cd7306fa365d6de0549ed2397edbf4df9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 14 Nov 2012 06:07:47 +0100 Subject: smc: Introduce an id and prefix all log messages with SMC(ID) When OpenBSC is handling more than one message at a time it is difficult to see which log message belongs to which SMC. Introduce a uint64_t id that can be set to the row_id/message_id and prefix all log messages with SMC(ID). This change is ABI and API incompatible with previous versions of libosmogsm. Example: SMC(100) instance created SMC(100) message MNSMS-EST-REQ received in state IDLE --- include/osmocom/gsm/gsm0411_smc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/gsm0411_smc.h b/include/osmocom/gsm/gsm0411_smc.h index 2140db43..239ee13c 100644 --- a/include/osmocom/gsm/gsm0411_smc.h +++ b/include/osmocom/gsm/gsm0411_smc.h @@ -24,6 +24,7 @@ #define GSM411_MNSMS_REL_REQ 0x107 struct gsm411_smc_inst { + uint64_t id; /* a unique id for the SMS */ int network; /* is this a MO (0) or MT (1) transfer */ int (*mn_recv) (struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg); @@ -43,7 +44,7 @@ struct gsm411_smc_inst { extern const struct value_string gsm411_cp_cause_strs[]; /* init a new instance */ -void gsm411_smc_init(struct gsm411_smc_inst *inst, int network, +void gsm411_smc_init(struct gsm411_smc_inst *inst, uint64_t id, int network, int (*mn_recv) (struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg), int (*mm_send) (struct gsm411_smc_inst *inst, int msg_type, -- cgit v1.2.3