Fix app manager fail to install large app file issue (#555)

Remove the limit of app file size no larger than 1 MB, fix possible memory leak issues when fail to install app file, change message size of aee_host_msg_callback() from uint16 type to uint32 type to fix possible integer overflow issue, and fix some coding style issues of app manager.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-03-03 06:19:24 -06:00
committed by GitHub
parent fe76ce3b68
commit 54e82ec439
14 changed files with 293 additions and 207 deletions

View File

@ -136,7 +136,8 @@ void * am_dispatch_request(request_t *request)
}
bool am_register_resource(const char *url,
void (*request_handler)(request_t *, void *), uint32 register_id)
void (*request_handler)(request_t *, void *),
uint32 register_id)
{
app_res_register_t * r = g_resources;
int register_num = 0;
@ -158,7 +159,7 @@ bool am_register_resource(const char *url,
if (register_num >= RESOURCE_REGISTRATION_NUM_MAX)
return false;
r = (app_res_register_t *) APP_MGR_MALLOC(sizeof(app_res_register_t));
r = (app_res_register_t *)APP_MGR_MALLOC(sizeof(app_res_register_t));
if (r == NULL)
return false;