Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/liblognorm.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,12 @@ ln_loadSamples(ln_ctx ctx, const char *file)
ctx->conf_ln_nbr = 0;
++ctx->include_level;
r = ln_sampLoad(ctx, file);
--ctx->include_level;
if (r != -1) {
--ctx->include_level;
ctx->conf_file = NULL;
}

free((void*)tofree);
ctx->conf_file = NULL;
done:
return r;
}
Expand Down
4 changes: 3 additions & 1 deletion src/samp.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ getTypeName(ln_ctx ctx,
int r = -1;
size_t iDst;
size_t i = *offs;

if(buf[i] != '@') {
ln_errprintf(ctx, 0, "user-defined type name must "
"start with '@'");
Expand Down Expand Up @@ -1139,11 +1139,13 @@ ln_sampLoad(ln_ctx ctx, const char *file)
ln_dbgprintf(ctx, "rulebase version is %d\n", version);
if(version == -1) {
ln_errprintf(ctx, errno, "error determing version of %s", file);
fclose(repo);
goto done;
}
if(ctx->version != 0 && version != ctx->version) {
ln_errprintf(ctx, errno, "rulebase '%s' must be version %d, but is version %d "
" - can not be processed", file, ctx->version, version);
fclose(repo);
goto done;
}
ctx->version = version;
Expand Down