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

add-contextual-data: build fixed on SLES-11 #1148

Merged
merged 2 commits into from
Aug 9, 2016

Conversation

lbudai
Copy link
Collaborator

@lbudai lbudai commented Aug 2, 2016

  • include missing header
  • as g_array_set_clear_func is only available from glib version 2.32,
    I removed it

Fixes: #1144

Signed-off-by: Laszlo Budai stentor.bgyk@gmail.com

 * include missing header
 * as `g_array_set_clear_func` is only available from glib version 2.32,
   I removed it

Fixes: syslog-ng#1144

Signed-off-by: Laszlo Budai <stentor.bgyk@gmail.com>
@@ -1074,7 +1075,7 @@ _verify_unique_persist_names_among_pipes(const GPtrArray *initialized_pipes)

if (current_pipe_name != NULL)
{
if (g_hash_table_contains(pipe_persist_names, current_pipe_name))
if (g_hash_table_lookup_extended(pipe_persist_names, current_pipe_name, &orig_key, &value))
Copy link
Collaborator

@MrAnno MrAnno Aug 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last two arguments can be NULL, if we don't need them in the future (they hid it well in their documentation: orig_key, value - [optional][nullable]).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll update the PR.

@MrAnno
Copy link
Collaborator

MrAnno commented Aug 3, 2016

👍

* use g_hash_table_replace instead of g_hash_table_add

Documentation[1] says :
  This is a convenience function for using a GHashTable as a set.
  It is equivalent to calling g_hash_table_replace() with key as
  both the key and the value.

[1] - https://developer.gnome.org/glib/stable/glib-Hash-Tables.html#g-hash-table-replace

* use g_hash_table_lookup_extended instead of g_hash_table_contains

Signed-off-by: Laszlo Budai <Laszlo.Budai@balabit.com>
@lbudai lbudai force-pushed the f/add-contextual-data-compile-fixes branch from 5dd4878 to 16a21b8 Compare August 4, 2016 13:23
@kvch
Copy link
Contributor

kvch commented Aug 9, 2016

👍

@kvch kvch merged commit 6bae1a7 into syslog-ng:master Aug 9, 2016
@kvch kvch removed the in progress label Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants