LOG: set the return code when calloc fails

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
LOG: fix the format comparison to avoid generating multiple entries.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
ptrie: deref the current node in trie_iter_free()

If free'ing the iterator before getting to the last
node make sure we de-ref the current node. Else we
will not be able to delete the node.

fixes #44

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Make sure we don't use the format string whilst it is getting changed.

Just add a rwlock around the usage.
Move qb_log_format_set() to log_format.c to make this easier.

Fixes #45

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
IPC: don't over log on disconnect

Thanks grueni: https://github.com/asalkeld/libqb/pull/43

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix strlcpy and strlcat functions

These were not behaving as the man pages described.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix the blackbox formatter when specifing the string len/precision

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
LOG: fix truncation in some messages that get padded.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fedora's splint has a strange syntax error, don't fail on it.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
LOG: add a test for a padded hex int.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
TEST: add a progam to compare the speed of vsnprintf and qb_vsnprintf_serialize

On my system I get:

qb store] Duration:     8.289 OPs/sec: 1206381.250
snprintf] Duration:    16.712 OPs/sec: 598368.000

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Fix return code which is an error occurred at pthread function
Merge pull request #48 from miz-take/prototype

Fix return code which is an error occurred at pthread function
Add travis link to the readme.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Unify the list processing with qb_list function
Merge pull request #49 from miz-take/prototype

Unify the list processing with qb_list function
Document the default prefix in INSTALL

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Unify to QB_TRUE/QB_FALSE a boolean value
Merge pull request #50 from miz-take/prototype

Unify to QB_TRUE/QB_FALSE a boolean value
Add the processing which remove hash node and notifier at hashtable_destroy function