From 10739188ae5a27b3ab9d5e6bc86974d7b017efdf Mon Sep 17 00:00:00 2001 From: Seongeun Choi Date: Mon, 22 May 2017 17:28:58 +0900 Subject: [PATCH] external/wakaama : fix bug parsing int64_t type This commit fixes an unresolved wakaama server issue. When executing to create client resource, returns error COAP_400_BAD_REQUEST. To solve this problem, It's necessary to change the input data type to 64 bits. Change-Id: I5715093293c23b563e119641399f4b0a1fe97613 Signed-off-by: Seongeun Choi --- external/wakaama/examples/server/lwm2mserver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/external/wakaama/examples/server/lwm2mserver.c b/external/wakaama/examples/server/lwm2mserver.c index d5ec1d8..eef98e7 100644 --- a/external/wakaama/examples/server/lwm2mserver.c +++ b/external/wakaama/examples/server/lwm2mserver.c @@ -642,7 +642,8 @@ static void prv_create_client(char * buffer, { lwm2m_data_t * dataP; - if (1 != sscanf(buffer, "%d", &value)) + value = 0; + if (1 != sscanf(buffer, "%"PRId64, &value)) { fprintf(stdout, "Invalid value !"); return; -- 2.7.4