Skip to content

Commit bd94c14

Browse files
JSeimizuHirakawaTakaraTakutoYamaneoka-r
authored
Update to EDC v0.3.3 (#20)
* fix: replace malloc with calloc for memory allocation in evp_agent_esf_read_config (#397) Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * Delete SystemSendElog (#399) * Delete SystemSendElog * Delete SystemRegElog * Revert "Delete SystemRegElog" This reverts commit e8ce3bf83268927e25bd2f3afbea1d5624f287c1. Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * Add free config value. (#400) Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * Move end goto label. (#398) Co-authored-by: JSeimizu <124137997+JSeimizu@users.noreply.github.com> Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * remove debug options of WAMR build options (#404) Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * Add call SystemRegElog in evp_agent_notifications_register() (#403) * Add call SystemRegElog * Delete assert and refactor SystemRegElog. * Fix header file. Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * fix: check if proxy port is set before accessing it (#406) Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * Update workflow to use senscord v0.1.26. Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * Update SystemApp to v1.1.16. Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * fix: updated edc-sensor to v0.1.26. Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * release esf v1.14.1 Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> * bump: update project version to 0.3.3 (#417) Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> --------- Signed-off-by: Seimizu Joukan <Qingshui.Shangguan@sony.com> Co-authored-by: HirakawaTakara <137027129+HirakawaTakara@users.noreply.github.com> Co-authored-by: Takuto Yamane <104750313+TakutoYamane@users.noreply.github.com> Co-authored-by: Ryo Oka <95205614+oka-r@users.noreply.github.com>
1 parent 2a52fc0 commit bd94c14

File tree

10 files changed

+16
-38
lines changed

10 files changed

+16
-38
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Build EDC for RasPi with the devcontainer
1212
runs-on: ubuntu-24.04
1313
env:
14-
SENSCORD_VER: '0.1.23'
14+
SENSCORD_VER: '0.1.26'
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
project(
66
'edge device core',
77
'c', 'cpp',
8-
version : '0.3.2',
8+
version : '0.3.3',
99
)
1010
cc = meson.get_compiler('c')
1111
if meson.is_cross_build()

src/evp-agent/src/esf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ static int get_cert_key_path(enum config_key key, char **cert_key_path)
212212
EVP_AGENT_ERR("Failed to find %s/*%s", dir_path, suffix);
213213
}
214214

215-
end:
216215
closedir(dir);
217216

217+
end:
218218
return ret;
219219
}
220220

@@ -267,7 +267,7 @@ struct config *evp_agent_esf_read_config(enum config_key key)
267267
}
268268

269269
max_size = g_max_sizes[key];
270-
buf = malloc(max_size + 1);
270+
buf = calloc(1, max_size + 1);
271271
if (!buf) {
272272
EVP_AGENT_ERR("Failed to allocate memory buffer for config");
273273
return NULL;
@@ -287,7 +287,7 @@ struct config *evp_agent_esf_read_config(enum config_key key)
287287
break;
288288
case EVP_CONFIG_MQTT_PROXY_PORT:
289289
case EVP_CONFIG_HTTP_PROXY_PORT:
290-
if (g_proxy_cache.port != NULL) {
290+
if (g_proxy_cache.port[0] != '\0') {
291291
strncpy(buf, g_proxy_cache.port, max_size);
292292
buf[max_size - 1] = '\0';
293293
}

src/evp-agent/src/log.c

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,8 @@ void SystemDlog(int priority, const char *tag, const char *file, int line, const
113113
free(max_logstr);
114114
}
115115

116-
int SystemRegElog(uint8_t component, uint8_t init_value, const char *msg)
116+
void SystemRegElog(uint8_t component, uint8_t init_value, const char *msg)
117117
{
118-
int ret = 0;
119-
120118
elog_lock();
121119
if (last < MAX_ELOG_ENTRY) {
122120
elog_array[last].component = component;
@@ -126,11 +124,9 @@ int SystemRegElog(uint8_t component, uint8_t init_value, const char *msg)
126124
last++;
127125
}
128126
else {
129-
ret = -ENOMEM;
127+
EVP_AGENT_WARN("Elog array is full. Cannot register component: 0x%x", component);
130128
}
131129
elog_unlock();
132-
133-
return ret;
134130
}
135131

136132
int SystemSetELog(uint8_t component, uint8_t code)
@@ -177,27 +173,6 @@ uint8_t SystemGetELog(uint8_t component)
177173
return code;
178174
}
179175

180-
void SystemSendElog(void)
181-
{
182-
int i;
183-
184-
elog_lock();
185-
for (i = 0; i < ELOG_ARRAY_SIZE; i++) {
186-
struct elog_entry *entry = &elog_array[i];
187-
188-
if (entry->updated) {
189-
SystemDlog(LOG_DEBUG, "ELOG", __func__, __LINE__,
190-
"component: %x, code: %x updated: %s, "
191-
"msg:%s \n",
192-
entry->component, entry->code, entry->updated ? "true" : "false",
193-
entry->msg);
194-
195-
entry->updated = false;
196-
}
197-
}
198-
elog_unlock();
199-
}
200-
201176
void evp_agent_dlog_handler(int lvl, const char *file, int line, const char *fmt, va_list ap,
202177
void *user)
203178
{

src/evp-agent/src/log.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ void SystemDlog(int priority, const char *tag, const char *file, int line, const
5959
void evp_agent_dlog_handler(int lvl, const char *file, int line, const char *fmt, va_list ap,
6060
void *user);
6161

62-
int SystemRegElog(uint8_t component, uint8_t init_value, const char *msg);
62+
void SystemRegElog(uint8_t component, uint8_t init_value, const char *msg);
6363
int SystemSetELog(uint8_t component, uint8_t code);
6464
uint8_t SystemGetELog(uint8_t component);
65-
void SystemSendElog(void);
6665

6766
#endif /* _SSF_ELOG_H__ */

src/evp-agent/src/notifications.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ static bool check_provisioning_service_mqtt_host(void)
485485
if (strcmp(cfg->value, PROVISIONING_SERVICE_URL) == 0) {
486486
is_provisioning_service = true;
487487
}
488+
cfg->free(cfg->value);
488489
cfg->free(cfg);
489490
}
490491

@@ -645,6 +646,10 @@ int evp_agent_notifications_register(struct evp_agent_context *ctxt)
645646
{
646647
int ret = 0;
647648

649+
SystemRegElog(ELOG_EVP_BLOB_NETWORK_STATUS, 0x40, "EVP Block Warning.");
650+
SystemRegElog(ELOG_EVP_MQTT_STATUS, 0x0, "EVP Block Warning 2.");
651+
SystemRegElog(ELOG_EVP_WASM_STATUS, 0x0, "EVP Block Warning 3.");
652+
648653
ret = evp_agent_notification_subscribe(ctxt, "blob/result", elog_handler_blob_result, NULL);
649654
if (ret) {
650655
EVP_AGENT_ERR("Failed to subscribe to blob/result");

subprojects/packagefiles/wasm-micro-runtime/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ set (WAMR_BUILD_WASI_NN_ONNXRUNTIME 1)
1717
set (WAMR_BUILD_DUMP_CALL_STACK 1)
1818
# Disable OpenCV to avoid cross-compilation complexity
1919
set (WAMR_BUILD_WASI_NN_OPENCV OFF)
20-
set (CMAKE_BUILD_TYPE Debug)
2120
set (CMAKE_C_FLAGS "-DAPP_THREAD_STACK_SIZE_DEFAULT=4194304 -DAPP_THREAD_STACK_SIZE_MIN=4194304")
2221
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
2322
add_library(vmlib STATIC ${WAMR_RUNTIME_LIB_SOURCE})

0 commit comments

Comments
 (0)