Loading go-apps/meep-sss/server/meep-sss.go +8 −2 Changes for go-apps/meep-sss/server/meep-sss.go: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -615,12 +615,17 @@ func startIotPlatformDiscoveryTicker() { continue } log.Debug("startIotPlatformDiscoveryTicker: uri: ", u) log.Debug("startIotPlatformDiscoveryTicker: host: ", u.Host) log.Debug("startIotPlatformDiscoveryTicker: port: ", u.Port()) log.Debug("startIotPlatformDiscoveryTicker: path: ", u.Path) log.Debug("startIotPlatformDiscoveryTicker: query: ", u.Query()) log.Debug("startIotPlatformDiscoveryTicker: scheme: ", u.Scheme) log.Debug("startIotPlatformDiscoveryTicker: raw: ", u.RawQuery) port := u.Port() u.Host = u.Scheme + "://" + u.Hostname() log.Debug("startIotPlatformDiscoveryTicker: address: ", u.Host) log.Debug("startIotPlatformDiscoveryTicker: port: ", port) // Need to send request...... p = sbi.IotPlatformInfo{ /* For HTTP */ Host: u.Host, Loading @@ -636,9 +641,10 @@ func startIotPlatformDiscoveryTicker() { Protocol: v.UserTransportInfo[0].Protocol, */ } p.Port, err = strconv.Atoi(u.Port()) p.Port, err = strconv.Atoi(port) if err != nil { log.Error("startIotPlatformDiscoveryTicker: Port comversion: ", err.Error()) // if u.Scheme == "https" { p.Port = 443 log.Debug("startIotPlatformDiscoveryTicker: Force port to 443") Loading go-packages/meep-sss-mgr/SssMgrBindingProtocol.go +1 −0 Changes for go-packages/meep-sss-mgr/SssMgrBindingProtocol.go: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ type SssMgrBindingProtocol interface { type SssMgrBindingProtocolContext struct { host string port int scheme string path string name string hostId string Loading go-packages/meep-sss-mgr/http.go +3 −2 Changes for go-packages/meep-sss-mgr/http.go: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -167,8 +167,9 @@ func (http_mgr *SssMgrHttp) send(p_ctx SssMgrBindingProtocolContext) (err error, if p_ctx.port != 443 { scheme = "http://" } if p_ctx.path != "" { url = scheme + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + p_ctx.path + "/" + to basePath := strings.Trim(p_ctx.path, "/") if basePath != "" { url = scheme + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + basePath + "/" + to } else { url = scheme + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + to } Loading go-packages/meep-sss-mgr/onem2m-mgr.go +9 −14 Changes for go-packages/meep-sss-mgr/onem2m-mgr.go: 9 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -462,26 +462,21 @@ func (tm *SssMgr) populateDevicesPerIotPlatforms() error { stateMu.RLock() iotPlatform, ok := registeredIotPlatformsMap[tm.hostId] log.Debug("populateDevicesPerIotPlatforms: iotPlatform: ", iotPlatform) stateMu.RUnlock() if !ok { return nil } // Refresh the list of devices for all registered Iot platform for _, iotPlatform := range registeredIotPlatformsMap { // Refresh only this manager's platform. Each SssMgr is bound to one CSE. log.Debug("populateDevicesPerIotPlatforms: processing: ", iotPlatform.Address) err := tm.populateSensors(iotPlatform, "3") if err != nil { log.Error("populateDevicesPerIotPlatforms: ", err) continue } err = tm.populateSensors(iotPlatform, "28") if err != nil { log.Error("populateDevicesPerIotPlatforms: ", err) continue } } // End of 'for' statement log.Debug("populateDevicesPerIotPlatforms: After loop") if profiling { Loading Loading @@ -760,7 +755,7 @@ func (tm *SssMgr) OneM2M_create(sensor SensorDiscoveryInfo, path string, origina host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[sensor.IotPlatformId].Name, name: pltf.Name, hostId: sensor.IotPlatformId, to: pltf.Name, from: originator, Loading Loading @@ -872,7 +867,7 @@ func (tm *SssMgr) OneM2M_discovery(type_ string, iotPlatformId string, originato host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[iotPlatformId].Name, name: pltf.Name, hostId: iotPlatformId, to: pltf.Name, from: originator, Loading Loading @@ -981,7 +976,7 @@ func (tm *SssMgr) OneM2M_get(path string, iotPlatformId string, originator strin host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[iotPlatformId].Name, name: pltf.Name, hostId: iotPlatformId, to: path, from: originator, Loading Loading @@ -1052,7 +1047,7 @@ func (tm *SssMgr) OneM2M_subscribe(iotPlatformId string, path string, originator host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[iotPlatformId].Name, name: pltf.Name, hostId: iotPlatformId, to: path, from: originator, Loading Loading @@ -1169,7 +1164,7 @@ func (tm *SssMgr) OneM2M_delete(sensor SensorDiscoveryInfo, originator string) ( host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[sensor.IotPlatformId].Name, name: pltf.Name, hostId: sensor.IotPlatformId, to: sensor.SensorIdentifier, from: originator, Loading Loading @@ -1230,9 +1225,9 @@ func (tm *SssMgr) OneM2M_delete_subscription(subId string, originator string) (e host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[subscriptionListPerSubId[subId].IotPlatformId].Name, hostId: subscriptionListPerSubId[subId].IotPlatformId, to: subscriptionListPerSubId[subId].SensorIdentifier, name: pltf.Name, hostId: sub.IotPlatformId, to: sub.SensorIdentifier, from: originator, op: 4, // DELETE ty: -1, Loading Loading
go-apps/meep-sss/server/meep-sss.go +8 −2 Changes for go-apps/meep-sss/server/meep-sss.go: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -615,12 +615,17 @@ func startIotPlatformDiscoveryTicker() { continue } log.Debug("startIotPlatformDiscoveryTicker: uri: ", u) log.Debug("startIotPlatformDiscoveryTicker: host: ", u.Host) log.Debug("startIotPlatformDiscoveryTicker: port: ", u.Port()) log.Debug("startIotPlatformDiscoveryTicker: path: ", u.Path) log.Debug("startIotPlatformDiscoveryTicker: query: ", u.Query()) log.Debug("startIotPlatformDiscoveryTicker: scheme: ", u.Scheme) log.Debug("startIotPlatformDiscoveryTicker: raw: ", u.RawQuery) port := u.Port() u.Host = u.Scheme + "://" + u.Hostname() log.Debug("startIotPlatformDiscoveryTicker: address: ", u.Host) log.Debug("startIotPlatformDiscoveryTicker: port: ", port) // Need to send request...... p = sbi.IotPlatformInfo{ /* For HTTP */ Host: u.Host, Loading @@ -636,9 +641,10 @@ func startIotPlatformDiscoveryTicker() { Protocol: v.UserTransportInfo[0].Protocol, */ } p.Port, err = strconv.Atoi(u.Port()) p.Port, err = strconv.Atoi(port) if err != nil { log.Error("startIotPlatformDiscoveryTicker: Port comversion: ", err.Error()) // if u.Scheme == "https" { p.Port = 443 log.Debug("startIotPlatformDiscoveryTicker: Force port to 443") Loading
go-packages/meep-sss-mgr/SssMgrBindingProtocol.go +1 −0 Changes for go-packages/meep-sss-mgr/SssMgrBindingProtocol.go: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ type SssMgrBindingProtocol interface { type SssMgrBindingProtocolContext struct { host string port int scheme string path string name string hostId string Loading
go-packages/meep-sss-mgr/http.go +3 −2 Changes for go-packages/meep-sss-mgr/http.go: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -167,8 +167,9 @@ func (http_mgr *SssMgrHttp) send(p_ctx SssMgrBindingProtocolContext) (err error, if p_ctx.port != 443 { scheme = "http://" } if p_ctx.path != "" { url = scheme + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + p_ctx.path + "/" + to basePath := strings.Trim(p_ctx.path, "/") if basePath != "" { url = scheme + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + basePath + "/" + to } else { url = scheme + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + to } Loading
go-packages/meep-sss-mgr/onem2m-mgr.go +9 −14 Changes for go-packages/meep-sss-mgr/onem2m-mgr.go: 9 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -462,26 +462,21 @@ func (tm *SssMgr) populateDevicesPerIotPlatforms() error { stateMu.RLock() iotPlatform, ok := registeredIotPlatformsMap[tm.hostId] log.Debug("populateDevicesPerIotPlatforms: iotPlatform: ", iotPlatform) stateMu.RUnlock() if !ok { return nil } // Refresh the list of devices for all registered Iot platform for _, iotPlatform := range registeredIotPlatformsMap { // Refresh only this manager's platform. Each SssMgr is bound to one CSE. log.Debug("populateDevicesPerIotPlatforms: processing: ", iotPlatform.Address) err := tm.populateSensors(iotPlatform, "3") if err != nil { log.Error("populateDevicesPerIotPlatforms: ", err) continue } err = tm.populateSensors(iotPlatform, "28") if err != nil { log.Error("populateDevicesPerIotPlatforms: ", err) continue } } // End of 'for' statement log.Debug("populateDevicesPerIotPlatforms: After loop") if profiling { Loading Loading @@ -760,7 +755,7 @@ func (tm *SssMgr) OneM2M_create(sensor SensorDiscoveryInfo, path string, origina host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[sensor.IotPlatformId].Name, name: pltf.Name, hostId: sensor.IotPlatformId, to: pltf.Name, from: originator, Loading Loading @@ -872,7 +867,7 @@ func (tm *SssMgr) OneM2M_discovery(type_ string, iotPlatformId string, originato host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[iotPlatformId].Name, name: pltf.Name, hostId: iotPlatformId, to: pltf.Name, from: originator, Loading Loading @@ -981,7 +976,7 @@ func (tm *SssMgr) OneM2M_get(path string, iotPlatformId string, originator strin host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[iotPlatformId].Name, name: pltf.Name, hostId: iotPlatformId, to: path, from: originator, Loading Loading @@ -1052,7 +1047,7 @@ func (tm *SssMgr) OneM2M_subscribe(iotPlatformId string, path string, originator host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[iotPlatformId].Name, name: pltf.Name, hostId: iotPlatformId, to: path, from: originator, Loading Loading @@ -1169,7 +1164,7 @@ func (tm *SssMgr) OneM2M_delete(sensor SensorDiscoveryInfo, originator string) ( host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[sensor.IotPlatformId].Name, name: pltf.Name, hostId: sensor.IotPlatformId, to: sensor.SensorIdentifier, from: originator, Loading Loading @@ -1230,9 +1225,9 @@ func (tm *SssMgr) OneM2M_delete_subscription(subId string, originator string) (e host: pltf.Address, port: pltf.Port, path: tm.path, name: registeredIotPlatformsMap[subscriptionListPerSubId[subId].IotPlatformId].Name, hostId: subscriptionListPerSubId[subId].IotPlatformId, to: subscriptionListPerSubId[subId].SensorIdentifier, name: pltf.Name, hostId: sub.IotPlatformId, to: sub.SensorIdentifier, from: originator, op: 4, // DELETE ty: -1, Loading