To prevent downgrade, checking the updatable flag which
is the result of version comparison.
In addition to this, add a log for cancel_reservation
Change-Id: I6df0d7f5706438547dd4d9e5eefe8cd694d3efc5
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
return UPDATE_CONTROL_ERROR_INVALID_URI;
}
+ /* Check if the found version is newer */
+ if (!update_info->updatable) {
+ _D("Already latest version");
+ return UPDATE_CONTROL_ERROR_SYSTEM_ERROR;
+ }
+
/* Downloading state */
_D("Download package from [%s]", update_info->package_uri);
_I("No reserved update");
return UPDATE_CONTROL_ERROR_NONE;
}
+ _D("Update reservation found. Cancel it");
ret = alarmmgr_remove_alarm(reserved_update_alarm_id);
if (ret < 0) {