Skip to content

Commit

Permalink
Get daemon buildable
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdrichard committed Jun 18, 2024
1 parent 6842e22 commit bad59fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion pkg/daemon/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ func main() {
plugins,
&hwconfigs,
&refreshNodePtpDevice,
closeProcessManager,
cp.pmcPollInterval,
lm,
).Run()
Expand Down
5 changes: 3 additions & 2 deletions pkg/daemon/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var (
// or stopped simultaneously.
type ProcessManager struct {
process []*ptpProcess
eventChannel chan event.EventChannel
}

// NewProcessManager is used by unit tests
Expand Down Expand Up @@ -112,6 +113,7 @@ type ptpProcess struct {
ptp4lConfigPath string
configName string
messageTag string
eventCh chan event.EventChannel
exitCh chan bool
execMutex sync.Mutex
stopped bool
Expand Down Expand Up @@ -434,7 +436,6 @@ func (dn *Daemon) applyNodePtpProfile(runID int, nodeProfile *ptpv1.PtpProfile)
configFile = fmt.Sprintf("phc2sys.%d.config", runID)
configPath = fmt.Sprintf("/var/run/%s", configFile)
case ts2phcProcessName:
clockType = event.GM
configInput = nodeProfile.Ts2PhcConf
configOpts = nodeProfile.Ts2PhcOpts
socketPath = fmt.Sprintf("/var/run/ptp4l.%d.socket", runID)
Expand Down Expand Up @@ -760,7 +761,7 @@ func (p *ptpProcess) cmdRun() {
output := scanner.Text()
if p.pmcCheck {
p.pmcCheck = false
go p.updateClockClass(&c)
go p.updateClockClass(nil)
}

if regexErr != nil || !logFilterRegex.MatchString(output) {
Expand Down

0 comments on commit bad59fc

Please sign in to comment.