lib: fix compilation for glib < 2.40
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 27 Jun 2019 20:03:55 +0000 (16:03 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 15:53:33 +0000 (11:53 -0400)
commitc3df794dfe9e8a7075a383809705792d18a81e1a
tree321d057379dcb68cd014fff740ec293c98c978e0
parentabdabab538802dcd8b805b71d7230336f2140822
lib: fix compilation for glib < 2.40

Code from commit "lib: add logic in auto-seek to recreate stream state"
uses the return value of function g_hash_table_insert to validate that
the inserted key did not previously exist in the hash table.  This
feature was introduced in glib 2.40, before that the function returned
void.

To avoid breaking compatibility with glib < 2.40, we can do a lookup
before inserting to achieve the same result.

Change-Id: Ibd5f58fb6ab8f083a3152105db9e05522893132c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1560
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/lib/graph/iterator.c
This page took 0.025193 seconds and 4 git commands to generate.