APUE Learning Example Source Code
guowenxue
2019-06-26 cee44963be8187137f9896fdb9162a38bd0e2721
pj1_mqttd/etc/conf.c
@@ -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);