fix more compiler errors

This commit is contained in:
richardsonjack 2018-04-19 18:44:56 +09:30
parent 6592ea4901
commit 1437b54450
1 changed files with 4 additions and 3 deletions

View File

@ -202,7 +202,7 @@ func main() {
// Is the netsender flag been used ? if so run this loop
for *netSenderFlagPtr {
periodicNetsenderReport()
sleepTime, err := strconv.Atoi(netsender.GetConfigParam("monPeriod"))
sleepTime, _ := strconv.Atoi(netsender.GetConfigParam("monPeriod"))
time.Sleep(time.Duration(sleepTime) * time.Second)
}
@ -234,7 +234,7 @@ func periodicNetsenderReport(){
}
inputs := []string{"X20", "X21"}
if _, reconfig, err := netsender.Send(netsender.RequestPoll, inputs); err != nil {
if _, _, err := netsender.Send(netsender.RequestPoll, inputs); err != nil {
config.Logger.Log("Error", err.Error())
}
@ -404,7 +404,8 @@ func revidReportActions(pin int) (int, error) {
func createRevidInstance(){
// Try to create the revid instance with the given config
for revidInst, err := revid.NewRevid(config); err != nil; {
var err error
for revidInst, err = revid.NewRevid(config); err != nil; {
// If the config does have a logger, use it to output error, otherwise
// just output to std output
if config.Logger != nil {