Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 1608b5d

Browse files
authored
Merge pull request #660 from DLTcollab/fix-endpoint-building
fix(endpoint): Fix Legato app building errors
2 parents cd3c1eb + 69f67b6 commit 1608b5d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $(MOSQUITTO_LIB): $(MOSQUITTO_DIR)
2727
$(MAKE) -C $^ WITH_DOCS=no
2828

2929
# Build endpoint Legato app
30-
legato:
30+
legato: cert
3131
# Generate resolv.conf
3232
echo "nameserver $(NAMESERVER)" > $(RESOLV_CONF_DIR)/resolv.conf
3333
# Fetch the required external source code

endpoint/endpointComp/Component.cdef

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ sources:
22
{
33
${CURDIR}/../endpoint_core.c
44

5+
${CURDIR}/../../output_base/external/entangled/utils/logger_helper.c
6+
57
${CURDIR}/../../output_base/external/http_parser/http_parser.c
68

79
${CURDIR}/../../output_base/external/mbedtls_2_16_6/library/aes.c
@@ -76,6 +78,7 @@ cflags:
7678
-I${CURDIR}/../../output_base/execroot/__main__/bazel-out/k8-fastbuild/bin/external/entangled
7779

7880
-I${CURDIR}/../../output_base/external/com_github_uthash/src
81+
-I${CURDIR}/../../output_base/external/com_github_embear_logger/include
7982
-I${CURDIR}/../../output_base/external/entangled
8083
-I${CURDIR}/../../output_base/external/http_parser
8184
-I${CURDIR}/../../output_base/external/keccak

endpoint/endpoint_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ status_t send_transaction_information(int value, const char* message, const char
8787
ret = aes_encrypt(&encrypt_ctx);
8888
memcpy(iv, encrypt_ctx.iv, AES_IV_SIZE);
8989

90-
if (ret != RET_OK) {
90+
if (ret != SC_OK) {
9191
ta_log_error("Encrypt message error.\n");
9292
return ret;
9393
}
@@ -102,7 +102,7 @@ status_t send_transaction_information(int value, const char* message, const char
102102
return SC_ENDPOINT_SEND_TRANSFER;
103103
}
104104

105-
if (send_https_msg(HOST, PORT, SEND_TRANSACTION_API, req_body, MAX_MSG_LEN, SSL_SEED) != RET_OK) {
105+
if (send_https_msg(HOST, PORT, SEND_TRANSACTION_API, req_body, SSL_SEED) != SC_OK) {
106106
ta_log_error("http message sending error.\n");
107107
return SC_ENDPOINT_SEND_TRANSFER;
108108
}

0 commit comments

Comments
 (0)