|
@@ -94,7 +94,7 @@ func GetDeviceInfoByIdentifier(urlparams martini.Params, r render.Render) {
|
|
server.Log.Printf("ACTION GetDeviceInfoByIdentifier, identifier:: %v", identifier)
|
|
server.Log.Printf("ACTION GetDeviceInfoByIdentifier, identifier:: %v", identifier)
|
|
device := &models.Device{}
|
|
device := &models.Device{}
|
|
|
|
|
|
- err := server.RPCCallByName(context.Background(), rpcs.RegistryServerName, "Registry.FindDeviceByIdentifier", identifier, device)
|
|
|
|
|
|
+ err := server.RPCCallByName(context.Background(), rpcs.RegistryServerName, "Registry.FindDeviceByIdentifier2", identifier, device)
|
|
if err != nil {
|
|
if err != nil {
|
|
r.JSON(http.StatusOK, renderError(ErrDeviceNotFound, err))
|
|
r.JSON(http.StatusOK, renderError(ErrDeviceNotFound, err))
|
|
return
|
|
return
|
|
@@ -161,6 +161,7 @@ func DeviceUpgrade(device *models.Device, urlparams martini.Params, req *http.Re
|
|
args.Url = param.Url
|
|
args.Url = param.Url
|
|
args.Md5 = param.MD5
|
|
args.Md5 = param.MD5
|
|
args.Version = param.Version
|
|
args.Version = param.Version
|
|
|
|
+ args.FileSize = param.FileSize
|
|
var reply rpcs.ReplyEmptyResult
|
|
var reply rpcs.ReplyEmptyResult
|
|
err = server.RPCCallByName(context.Background(), rpcs.MQTTAccessName, "Access.Upgrade", args, &reply)
|
|
err = server.RPCCallByName(context.Background(), rpcs.MQTTAccessName, "Access.Upgrade", args, &reply)
|
|
if err != nil {
|
|
if err != nil {
|