- for _, pc := range *pcs {
- uuid := pc.Fqdn + ":" + strconv.Itoa(int(pc.Port))
- if _, ok := rtmgr.Eps[uuid]; ok {
- rtmgr.Eps[uuid].Keepalive = true
- } else {
- ep := &rtmgr.Endpoint{
- uuid,
- pc.Name,
- PLATFORMTYPE,
- pc.Fqdn,
- pc.Port,
- rtmgr.PLATFORMMESSAGETYPES[pc.Name]["tx"],
- rtmgr.PLATFORMMESSAGETYPES[pc.Name]["rx"],
- nil,
- false,
- true,
- }
- rtmgr.Logger.Debug("ep created: %v",ep)
- if err := sbii.AddEndpoint(ep); err != nil {
- rtmgr.Logger.Error("can't create socket for endpoint: " + ep.Name + " due to:" + err.Error())
- continue
- }
- rtmgr.Eps[uuid] = ep
- }
- }
+ for _, pc := range *pcs {
+ uuid := pc.Fqdn + ":" + strconv.Itoa(int(pc.Port))
+ if _, ok := rtmgr.Eps[uuid]; ok {
+ rtmgr.Eps[uuid].Keepalive = true
+ } else {
+ ep := &rtmgr.Endpoint{
+ uuid,
+ pc.Name,
+ PLATFORMTYPE,
+ pc.Fqdn,
+ pc.Port,
+ rtmgr.PLATFORMMESSAGETYPES[pc.Name]["tx"],
+ rtmgr.PLATFORMMESSAGETYPES[pc.Name]["rx"],
+ nil,
+ false,
+ true,
+ }
+ rtmgr.Logger.Debug("ep created: %v", ep)
+ if err := sbii.AddEndpoint(ep); err != nil {
+ rtmgr.Logger.Error("can't create socket for endpoint: " + ep.Name + " due to:" + err.Error())
+ continue
+ }
+ rtmgr.Eps[uuid] = ep
+ }
+ }