Skip to content

Commit

Permalink
fixed empty pointer reference failure in agentctl report (#1941)
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
  • Loading branch information
fgschwan authored Oct 9, 2023
1 parent fce1eee commit 723f8db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/agentctl/commands/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,12 @@ func writeVPPEventLogReport(w io.Writer, errorW io.Writer, cli agentcli.Cli, oth
}

// get VPP startup time
vppStartUpTime, err := vppStartupTime(*clockOutput)
addRealTime := err == nil
var vppStartUpTime *time.Time
addRealTime := false
if clockOutput != nil {
vppStartUpTime, err = vppStartupTime(*clockOutput)
addRealTime = err == nil
}

// write event-log report (+ add into each line real date/time computed from VPP start timestamp)
err = writeVPPCLICommandReport("Retrieving vpp event-log information",
Expand Down

0 comments on commit 723f8db

Please sign in to comment.