summaryrefslogtreecommitdiff
path: root/mappers
diff options
context:
space:
mode:
authorZYZ <yaozhongzyz@126.com>2020-08-31 10:41:42 +0800
committerZYZ <yaozhongzyz@126.com>2020-08-31 11:18:26 +0800
commit8c3c3bcd91a8c9cebec3e85838d353f02d7ba54d (patch)
tree71f12485e40dae58ff6a01dbb8a0a6092ff8f9fe /mappers
parentMerge pull request #2081 from daixiang0/pr-comment (diff)
downloadkubeedge-8c3c3bcd91a8c9cebec3e85838d353f02d7ba54d.tar.gz
BluetoothMapper: fix logic error
Diffstat (limited to 'mappers')
-rw-r--r--mappers/bluetooth_mapper/controller/controller.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/mappers/bluetooth_mapper/controller/controller.go b/mappers/bluetooth_mapper/controller/controller.go
index 9582da84f..d3389fe6e 100644
--- a/mappers/bluetooth_mapper/controller/controller.go
+++ b/mappers/bluetooth_mapper/controller/controller.go
@@ -131,10 +131,10 @@ func (c *Config) handleScheduleCreateMessage(client MQTT.Client, message MQTT.Me
}
}
if scheduleExists {
- c.Scheduler.Schedules = append(c.Scheduler.Schedules, newSchedule)
klog.Infof("Schedule: %s has been updated", newSchedule.Name)
klog.Infof("Updated Schedule: %v", newSchedule)
} else {
+ c.Scheduler.Schedules = append(c.Scheduler.Schedules, newSchedule)
klog.Infof("Schedule: %s has been added", newSchedule.Name)
klog.Infof("New Schedule: %v", newSchedule)
}
@@ -187,10 +187,10 @@ func (c *Config) handleActionCreateMessage(client MQTT.Client, message MQTT.Mess
}
}
if actionExists {
- c.ActionManager.Actions = append(c.ActionManager.Actions, newAction)
klog.Infof("Action: %s has been updated", newAction.Name)
klog.Infof("Updated Action: %v", newAction)
} else {
+ c.ActionManager.Actions = append(c.ActionManager.Actions, newAction)
klog.Infof("Action: %s has been added ", newAction.Name)
klog.Infof("New Action: %v", newAction)
}