Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/dbparser split into smaller modules #608

Merged
merged 23 commits into from
Aug 25, 2015

Conversation

bazsi
Copy link
Collaborator

@bazsi bazsi commented Aug 2, 2015

This branch splits up dbparser into smaller modules in order to make parts a bit more reusable. I was explicitly trying not to change functionality and all patches in the set individually pass "make check" in the modules/dbparser subdirectory.

Please merge
Thanks.

@ihrwein
Copy link
Contributor

ihrwein commented Aug 4, 2015

Please remove patterndb-int.h from the Makefile, because make distcheck doesn't like it.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
At one point an error struct was created but not returned as it should have,
creating a leak and an unreported error.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Earlier both of the entries were stored in the same hash table, split them.
Smaller hashes are better and this makes the key a bit simpler.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
This is just a skeleton of the correllation functionality to be encapsulated
into a class. It is not just more than a wrapper around a hashtable.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
An instance of the CorrellationContext is used in the CorrellationState,
making it possible to create distinct, correllation-like functionality.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
The role of the new class is to encapsulate a message that is being
generated by syslog-ng itself.  It is always generated based on another,
triggering message, for instance it encapsulates the <message> actions
within a db-parser() action.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Instead of open-coding this function in the pdb XML loader, extract it as a
method.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
…struct

This helps to hide some of the internals of PatternDB.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
As we have the broken-down header files, this is not needed anymore.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
As we always store CorrellationContext, we can free it using
correllation_context_unref, thus we can make the API simpler.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
As the evaluation of patterndb rules were not extracted along into their
data structs, those connect a bit more to PatternDB itself, so rename the
methods accordingly.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
@bazsi bazsi force-pushed the f/dbparser-split-into-smaller-modules branch from 31e4376 to d90d4cc Compare August 14, 2015 15:25
@bazsi
Copy link
Collaborator Author

bazsi commented Aug 15, 2015

I have now fixed up the travis fallouts, so please merge.

Thanks.

@lbudai
Copy link
Collaborator

lbudai commented Aug 25, 2015

Thanks for this refactor!!

lbudai added a commit that referenced this pull request Aug 25, 2015
…dules

F/dbparser split into smaller modules
@lbudai lbudai merged commit 8bfb8e2 into master Aug 25, 2015
@bazsi bazsi deleted the f/dbparser-split-into-smaller-modules branch January 14, 2016 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants