diff options
| author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-11-14 06:07:47 +0100 | 
|---|---|---|
| committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-11-22 00:41:49 +0100 | 
| commit | 33e8a87cd7306fa365d6de0549ed2397edbf4df9 (patch) | |
| tree | a169c41cdcfeb4e260ae5698acc465917436dadf /include | |
| parent | 6643386f3fadea66a3a92207d1af07113269710a (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/osmocom/gsm/gsm0411_smc.h | 3 | 
1 files changed, 2 insertions, 1 deletions
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,  | 
