mirror of https://gerrit.osmocom.org/libosmocore
ctrl/vty: fsm: use correct element when iterating over fsm->proc.children
Fixes crashes when using vty `show fsm-instances all` when fsm children are present. Change-Id: I4ae0bee7f7f57ec6675cfb52ca6cf0d523d15362
This commit is contained in:
parent
95fdbc14ff
commit
49865053bc
|
@ -156,7 +156,7 @@ static int get_fsm_inst_dump(struct ctrl_cmd *cmd, void *data)
|
|||
if (fi->proc.parent)
|
||||
cmd->reply = talloc_asprintf_append(cmd->reply, ",parent='%s'", fi->proc.parent->name);
|
||||
|
||||
llist_for_each_entry(child, &fi->proc.children, list) {
|
||||
llist_for_each_entry(child, &fi->proc.children, proc.child) {
|
||||
cmd->reply = talloc_asprintf_append(cmd->reply, ",child='%s'", child->name);
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi)
|
|||
fsmi->proc.parent_term_event),
|
||||
VTY_NEWLINE);
|
||||
}
|
||||
llist_for_each_entry(child, &fsmi->proc.children, list) {
|
||||
llist_for_each_entry(child, &fsmi->proc.children, proc.child) {
|
||||
vty_out(vty, " Child: '%s'%s", child->name, VTY_NEWLINE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue