Developing lightweight computation at the DSG edge

Commit 964992ec authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[goclidote] Better check what the client returns


Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent 53cb92ef
......@@ -121,7 +121,7 @@ func AntidoteRemoveRegisterInBucket(bucketName string, registerName string) bool
err = tx.Commit()
errCheck(err, "")
if string(setVal[:]) == "" {
if string(setVal[:]) == string("") {
return true
}
......@@ -199,7 +199,9 @@ func ReadDevicesFromAntidote() []cnml.DeviceIpv4sGraphserver {
var thisDev cnml.DeviceIpv4sGraphserver
thisDev.ID = thisDevID
thisDev.GraphServer, err = strconv.Atoi(AntidoteReadRegisterInBucket(fmt.Sprintf("device-%d", thisDevID), "graphserver"))
errCheck(err, "")
if err != nil {
thisDev.GraphServer = 0
}
thisDev.Addresses = AntidoteReadItemsFromSetInBucket(fmt.Sprintf("device-%d", thisDevID), "ipv4s")
devices = append(devices, thisDev)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment