APUE Learning Example Source Code
guowenxue
2020-01-01 5c07107b73c234ef1f80a92abe795bf3f5c7050f
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);