| | |
| | | |
| | | if( !conf_file ) |
| | | { |
| | | strncpy(ctx->id, "\"x86host02\"", sizeof(ctx->id)); |
| | | |
| | | /* logger settings */ |
| | | strncpy(ctx->logfile, "/tmp/mqttd.log", 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; |
| | | |
| | |
| | | |
| | | log_nrml("Logger system initialise ok\n"); |
| | | |
| | | /*+------------------------------------------------------+ |
| | | *| parser production ID | |
| | | *+------------------------------------------------------+*/ |
| | | |
| | | if( !(str=iniparser_getstring(ini, "common:id", NULL)) ) |
| | | { |
| | | 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) ); |
| | | |
| | | log_nrml("Parser production ID [%s]\n", ctx->id); |
| | | |
| | | |
| | | /*+------------------------------------------------------+ |