Enable WASI feature, enhance security and add SGX sample (#142)

Change emcc to clang
Refine interpreter to improve perforamnce
This commit is contained in:
Weining
2019-11-20 21:16:36 +08:00
committed by wenyongh
parent 29c7c743e9
commit 27f246b5f3
159 changed files with 9543 additions and 3789 deletions

View File

@ -298,7 +298,7 @@ static int subscribe(reg_info *info)
p = strtok(info->urls, ",");
while(p != NULL) {
char url[URL_MAX_LEN] = {0};
sprintf(url, "%s%s", "/event/", p);
snprintf(url, URL_MAX_LEN, "%s%s", "/event/", p);
init_request(request,
url,
COAP_PUT,
@ -312,7 +312,7 @@ static int subscribe(reg_info *info)
#else
char url[URL_MAX_LEN] = { 0 };
char *prefix = info->urls[0] == '/' ? "/event" : "/event/";
sprintf(url, "%s%s", prefix, info->urls);
snprintf(url, URL_MAX_LEN, "%s%s", prefix, info->urls);
init_request(request, url, COAP_PUT,
FMT_ATTR_CONTAINER,
NULL, 0);
@ -332,7 +332,7 @@ static int unsubscribe(unreg_info *info)
p = strtok(info->urls, ",");
while(p != NULL) {
char url[URL_MAX_LEN] = {0};
sprintf(url, "%s%s", "/event/", p);
snprintf(url, URL_MAX_LEN, "%s%s", "/event/", p);
init_request(request,
url,
COAP_DELETE,
@ -345,7 +345,7 @@ static int unsubscribe(unreg_info *info)
}
#else
char url[URL_MAX_LEN] = { 0 };
sprintf(url, "%s%s", "/event/", info->urls);
snprintf(url, URL_MAX_LEN, "%s%s", "/event/", info->urls);
init_request(request, url, COAP_DELETE,
FMT_ATTR_CONTAINER,
NULL, 0);
@ -777,7 +777,7 @@ int main(int argc, char *argv[])
int ret;
imrt_link_recv_context_t recv_ctx = { 0 };
char buffer[BUF_SIZE] = { 0 };
uint32_t last_check, total_elpased_ms = 0;
uint32_t last_check = 0, total_elpased_ms = 0;
bool is_responsed = false;
operation op;