diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-22 09:55:19 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-22 09:55:19 +0200 |
| commit | 08b5cab875f1a84162bb47773bbe72135135b90e (patch) | |
| tree | 1228363b956b10b240fe05b13c9d9bb2e79d9bb6 /src/fsm.go | |
| parent | c7efec780a9e11e97690a19cf751533279788e79 (diff) | |
FSM: Make data for transitions optional
Diffstat (limited to 'src/fsm.go')
| -rw-r--r-- | src/fsm.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -119,7 +119,7 @@ func (eduvpn *VPNState) writeGraph() { f.WriteString(graph) } -func (eduvpn *VPNState) GoTransition(newState FSMStateID, data string) bool { +func (eduvpn *VPNState) GoTransitionWithData(newState FSMStateID, data string) bool { ok := eduvpn.HasTransition(newState) if ok { @@ -134,6 +134,10 @@ func (eduvpn *VPNState) GoTransition(newState FSMStateID, data string) bool { return ok } +func (eduvpn *VPNState) GoTransition(newState FSMStateID) bool { + return eduvpn.GoTransitionWithData(newState, "") +} + func (eduvpn *VPNState) generateDotGraph() string { graph := `digraph eduvpn_fsm { nodesep = 2; |
