Jan Pokorný
ef5b1cf4cb
warnings cleanup: Wformat: sign-correct PRIu32 specifiers as appropriate
...
Looks like these are not accepted with splint checker. Also fix some
other minor type -- print format specifier discrepancies.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2017-12-21 01:50:15 +01:00
Christine Caulfield
5889f1ea46
tests: make qb logging under check always dispose the memory
...
examples/tests: make qb logging dispose the memory
A.k.a. "be a good example of using this very library".
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2017-09-18 10:30:40 +01:00
Ferenc Wágner
8fad8acb67
configure: restrict nsl lib to where it's actually needed
2016-12-12 11:47:21 +01:00
Ferenc Wágner
1a9b4128e4
configure: restrict socket lib to where it's actually needed
2016-12-12 11:47:21 +01:00
Jan Pokorný
c1c26c94cb
Low: sanitize import of <qb/qbarray.h> symbols
2016-10-17 17:25:50 +02:00
Jan Pokorný
6e6791113f
example: simplelog supports -o (for stdout sink)
2016-02-15 16:52:11 +01:00
David Vossel
be3a2d32a5
Low: examples: fix race condition in glib mainloop example
2015-04-24 18:07:05 -04:00
zouyu
bb70e2770f
fix invalid option when run 'ipcclient -h'
2014-06-30 16:36:41 +08:00
David Vossel
ecff303865
Low: example: Update client/server example to use server enforced buffer size
2013-11-18 22:29:15 -06:00
David Vossel
1e1397fb22
Low: ipcserver.c: Fix example server's glib mainloop implementation
2013-07-23 20:29:20 -05:00
David Vossel
a78526a445
Fixes detect disconnect on send for tcp example
2013-07-22 18:26:50 -05:00
David Vossel
1462e80af4
Fixes less-than-zero comparision of unsigned int
2013-07-22 17:00:11 -05:00
David Vossel
c0cb0a3ecb
Low remove ref-count error in example ipcserver.
2013-06-28 16:24:55 -05:00
Angus Salkeld
6d7da39866
Remove some test code mistakenly committed to the example program.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-24 10:31:52 +10:00
Angus Salkeld
f54764e1ec
IPC: make each connection ref the owning service
...
This is because the connection functions use the c->service pointer
and this needs to be mirrored in the reference counting.
The service can only be free'd when all connections are destroyed
and the user as unreferenced all previously referenced connections
and the service.
Fixes #62
Thanks to Jan Friesse for the reproducer
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-22 12:03:26 +10:00
Angus Salkeld
ca9d9dd31f
Example: make the blackbox example more practical.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-15 11:50:25 +11:00
Angus Salkeld
c533b24efa
example/test: check for error in qb_ipc_run()
...
Hopefully all of them this time.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-08 20:53:21 +11:00
Angus Salkeld
ecf3d6f854
example: check for error in qb_ipc_run()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-08 20:45:57 +11:00
Angus Salkeld
92b3b415b5
openbsd requires netinet/in.h before arpa/inet.h
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 22:40:38 +10:00
Angus Salkeld
43b49dfda9
Remove uses of timersub and use qb_util_stopwatch
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-28 22:05:09 +10:00
Fabio M. Di Nitto
5e16bcd004
build: fix libqb.pc creation and make maintainer-clean
...
LIB_RT is unnecessary around. AC_CHECK_LIBS will do the right thing
similar for the other libs that are all exported via LIBS
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-08-27 15:07:36 +02:00
Angus Salkeld
b9f8ec34df
LOG: fix threaded logging.
...
This has been broken for a year - yikes!
Thanks to Voznesensky Vladimir for spotting it.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-14 11:01:52 +10:00
Angus Salkeld
ad05e6323d
ipc example: add -e (events) option
...
use events instead of responses
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:08:04 +10:00
Angus Salkeld
ca9fbe0246
example: make the priority uint8_t
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 21:51:13 +10:00
Angus Salkeld
70a9623a48
Remove message queues
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 13:41:04 +10:00
Angus Salkeld
a8405ab06d
blackbox: fix the print_from_file()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-24 19:22:55 +10:00
Angus Salkeld
c56427e19e
LOG: accept NULL strings into the blackbox
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-24 14:16:54 +10:00
Angus Salkeld
257897e38a
Add benchmark option (-b) to examples/ipcclient
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-21 08:34:59 +10:00
Angus Salkeld
e3d8078f0a
Add some special commands into the ipc example
...
type "events" and the server will send 10 events.
type 'kill' into the client and this will simulate the server dying.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 15:49:42 +10:00
Angus Salkeld
ddcff095b5
Run ./Lindent in the examples directory
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-26 21:41:44 +10:00
Angus Salkeld
4bfe2fbd14
Add some debug code to the ipcclient example
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-26 21:36:49 +10:00
Angus Salkeld
ce1da1f28f
Get the example socket includes right.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 09:51:28 +10:00
Jan Friesse
c3aeaa22c7
Add inet header to tcpclient example
...
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-03 21:23:18 +10:00
Angus Salkeld
1af214d91d
Try and improve the portability on bsd variants.
...
Also add a QB_IPC_NATIVE type that selects the best ipc type available.
Signed-off-by: Angus <angus@anguss-mac-mini>
2012-03-24 22:43:37 +11:00
Angus Salkeld
0d21be245b
ARRAY: save memory (in the bins array) and allow holes in the array
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-22 17:30:19 +11:00
Angus Salkeld
4dbfebbdbc
LOG: add stdout target
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-20 14:46:43 +11:00
Angus Salkeld
ff0d89721f
LOG: Add qb_log_filter_fn_set()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-15 15:40:58 +11:00
Angus Salkeld
293813552b
Don't mix enums (QB_TRUE/TRUE)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-08 22:00:49 +11:00
Angus Salkeld
42d20b5090
Get coverity to ignore this warning.
...
"Using uninitialized element of array"
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-03 14:42:25 +11:00
Angus Salkeld
0710b40cde
Change example code to use fgets instead of gets
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-03 14:37:37 +11:00
Angus Salkeld
b711f73ce7
LOG: add %N (log name) as a format option
...
This will log the name passed into qb_log_init()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-09 16:02:53 +11:00
Angus Salkeld
aba197dd51
Fix two simple coverity warnings
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-05 16:43:04 +11:00
Angus Salkeld
5d8c96314e
Allow the array to automatically grow.
...
this makes it a bit friendlier to use, as
the user will not have to call qb_array_grow().
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-04 21:40:03 +11:00
Fabio M. Di Nitto
9f5d0aebbb
Fix some sparc test failures.
...
I (Angus) have changed some of Fabio's changes.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-22 13:56:20 +11:00
Angus Salkeld
30ba4cee83
make -rt configurable (not needed on mac)
...
Thanks to Andrew Beekhof
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-19 22:12:08 +11:00
Angus Salkeld
3f6d9e4c3c
examples: add example corosync data to mapnotify.c
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-18 22:52:29 +11:00
Angus Salkeld
edafc12823
MAP: add honza's example application.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-14 00:32:43 +11:00
Angus Salkeld
dfe624f5a9
examples: add ipc client/server
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 22:40:26 +11:00
Angus Salkeld
b9dc96e40b
examples: Add tcpclient.c/tcpserver.c
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 22:40:26 +11:00
Angus Salkeld
e1e83aa746
Move simple-log.c to examples/
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 22:40:26 +11:00