From cee44963be8187137f9896fdb9162a38bd0e2721 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Wed, 26 Jun 2019 13:17:17 +0800 Subject: [PATCH] update pj1_mqttd conf.c --- pj1_mqttd/etc/conf.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pj1_mqttd/etc/conf.c b/pj1_mqttd/etc/conf.c index ed05e55..000c10a 100644 --- a/pj1_mqttd/etc/conf.c +++ b/pj1_mqttd/etc/conf.c @@ -28,8 +28,8 @@ strncpy(ctx->id, "\"x86host02\"", sizeof(ctx->id)); /* logger settings */ - //strncpy(ctx->logfile, "/tmp/mqttd.log", sizeof(ctx->logfile)); - strncpy(ctx->logfile, DBG_LOG_FILE, sizeof(ctx->logfile)); + strncpy(ctx->logfile, "/tmp/mqttd.log", sizeof(ctx->logfile)); + //strncpy(ctx->logfile, DBG_LOG_FILE, sizeof(ctx->logfile)); ctx->loglevel = LOG_LEVEL_DEBUG; ctx->logsize = 1024; @@ -103,9 +103,9 @@ log_err("ERROR: Parser production ID failure\n"); return -2; } - snprintf(ctx->id, sizeof(ctx->id), "\"%s\"", str); - //strncpy(ctx->id, str, sizeof(ctx->id) ); + /* cJSON parser ID will get "" */ + snprintf(ctx->id, sizeof(ctx->id), "\"%s\"", str); log_nrml("Parser production ID [%s]\n", ctx->id); -- Gitblit v1.9.1