Fixed lpc2xml_test programm

This commit is contained in:
Sylvain Berfini 2016-04-27 15:07:31 +02:00
parent ad382a060c
commit b58f81dbea
2 changed files with 3 additions and 1 deletions

View file

@ -169,6 +169,7 @@ static void processSection_cb(const char *entry, struct __processSectionCtx *ctx
if (lp_config_get_skip_flag_for_entry(ctx->ctx->lpc, ctx->section, entry)) {
lpc2xml_log(ctx->ctx, LPC2XML_WARNING, "Skipped entry %s", entry);
ctx->ret = 0;
return;
}
@ -210,6 +211,7 @@ static void processConfig_cb(const char *section, struct __processConfigCtx *ctx
if (lp_config_get_skip_flag_for_section(ctx->ctx->lpc, section)) {
lpc2xml_log(ctx->ctx, LPC2XML_WARNING, "Skipped section %s", section);
ctx->ret = 0;
return;
}

View file

@ -56,8 +56,8 @@ int main(int argc, char *argv[]) {
lpc = lp_config_new(argv[2]);
if(strcmp("convert", argv[1]) == 0 && argc == 4) {
ctx = lpc2xml_context_new(cb_function, NULL);
lpc2xml_convert_file(ctx, argv[3]);
lpc2xml_set_lpc(ctx, lpc);
lpc2xml_convert_file(ctx, argv[3]);
lpc2xml_context_destroy(ctx);
} else if (strcmp("dump", argv[1]) == 0 && argc == 3) {
char *dump = lp_config_dump_as_xml(lpc);