aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/core/fsm.h13
-rw-r--r--src/fsm.c13
2 files changed, 13 insertions, 13 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index 57d9a76c..8f65533b 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -125,6 +125,19 @@ void osmo_fsm_log_addr(bool log_addr);
#define LOGPFSM(fi, fmt, args...) \
LOGPFSML(fi, (fi)->log_level, fmt, ## args)
+#define LOGPFSMLSRC(fi, level, caller_file, caller_line, fmt, args...) \
+ LOGPSRC((fi)->fsm->log_subsys, level, \
+ caller_file, caller_line, \
+ "%s{%s}: " fmt, \
+ osmo_fsm_inst_name(fi), \
+ osmo_fsm_state_name((fi)->fsm, (fi)->state), \
+ ## args)
+
+#define LOGPFSMSRC(fi, caller_file, caller_line, fmt, args...) \
+ LOGPFSMLSRC(fi, (fi)->log_level, \
+ caller_file, caller_line, \
+ fmt, ## args)
+
int osmo_fsm_register(struct osmo_fsm *fsm);
void osmo_fsm_unregister(struct osmo_fsm *fsm);
struct osmo_fsm_inst *osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv,
diff --git a/src/fsm.c b/src/fsm.c
index c9902ae7..750f0160 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -284,19 +284,6 @@ const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state)
return fsm->states[state].name;
}
-#define LOGPFSMLSRC(fi, level, caller_file, caller_line, fmt, args...) \
- LOGPSRC((fi)->fsm->log_subsys, level, \
- caller_file, caller_line, \
- "%s{%s}: " fmt, \
- osmo_fsm_inst_name(fi), \
- osmo_fsm_state_name((fi)->fsm, (fi)->state), \
- ## args)
-
-#define LOGPFSMSRC(fi, caller_file, caller_line, fmt, args...) \
- LOGPFSMLSRC(fi, (fi)->log_level, \
- caller_file, caller_line, \
- fmt, ## args)
-
/*! \brief perform a state change of the given FSM instance
*
* Best invoke via the osmo_fsm_inst_state_chg() macro which logs the source