diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-31 16:34:49 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-09 17:57:15 +0200 |
commit | a64c45a03e3b318b5fdc93c960670d89a5745271 (patch) | |
tree | 2b89c218d75ccfa85c5faed719f1373f7bff9223 /include/osmocom/core/fsm.h | |
parent | 6e8c0884729eedbf4fc66414b67300d505ac17bb (diff) |
add osmo_fsm_inst_update_id_f()
In the osmo-msc, I would like to set the subscr conn FSM identifier by a string
format, to include the type of Complete Layer 3 that is taking place. I could
each time talloc a string and free it again. This API is more convenient.
From osmo_fsm_inst_update_id(), call osmo_fsm_inst_update_id_f() with "%s" (or
pass NULL).
Put the name updating into separate static update_name() function to clarify.
Adjust the error message for erratic ID: don't say "allocate", it might be from
an update. Adjust test expectation.
Change-Id: I76743a7642f2449fd33350691ac8ebbf4400371d
Diffstat (limited to 'include/osmocom/core/fsm.h')
-rw-r--r-- | include/osmocom/core/fsm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 2c2a9961..174396a7 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -159,6 +159,7 @@ void osmo_fsm_inst_change_parent(struct osmo_fsm_inst *fi, void osmo_fsm_inst_free(struct osmo_fsm_inst *fi); int osmo_fsm_inst_update_id(struct osmo_fsm_inst *fi, const char *id); +int osmo_fsm_inst_update_id_f(struct osmo_fsm_inst *fi, const char *fmt, ...); const char *osmo_fsm_event_name(struct osmo_fsm *fsm, uint32_t event); const char *osmo_fsm_inst_name(struct osmo_fsm_inst *fi); |