Commit Graph

712 Commits

Author SHA1 Message Date
Angus Salkeld
deddaea86c RB: convert the rb_peek() status into a recv like status.
peek returns 0 on no data, so convert that to -EAGAIN.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-17 12:22:31 +10:00
Angus Salkeld
121abe3dbe RB: use internal reclaim function
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-17 12:22:26 +10:00
Angus Salkeld
3b31023d84 IPC: use calloc instead of malloc to fix valgrind warnings
This is to cleanup some valgrind warnings.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-17 12:22:17 +10:00
Angus Salkeld
59bdedf59b Upgrade the doxygen config.
The new doxygen says SHOW_DIRECTORIES is deprecated.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-14 22:30:24 +10:00
Angus Salkeld
740f9df7ac Fix a valgrind error.
just use the receive buffer, as it will be big enough.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-14 22:29:25 +10:00
The Quarterback Library Release Team
1c2b77f005 Bump the version to 0.14.0
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2012-06-22 16:29:32 +10: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
22569f51ba Add user control of the permissions that are set on the shared mem files
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-13 08:21:09 +10:00
Andrew Beekhof
e70e7908f0 LOG: Restrict string trucation during serialization to when a precision is specified 2012-06-07 15:02:06 +10:00
Andrew Beekhof
bb2e307241 LOG: Gracefully fail when the caller exceeds QB_LOG_MAX_LEN 2012-06-07 14:41:03 +10:00
Andrew Beekhof
9b0bb4e80e LOG: Observe field widths when serializing string arguments 2012-06-07 14:40:34 +10:00
Angus Salkeld
3369581066 RB: use the same mechanism in reclaim as read/peek to detect end-of-ring
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-07 12:02:32 +10:00
Angus Salkeld
cec82e0117 Add needs_response_ack option to ./check
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 16:23:41 +10:00
Angus Salkeld
9520fc4501 RB: fix wrong sem_flg IPC_NOWAIT option
The #ifdef was the wrong way around causing
the sem to return early with EAGAIN.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 16:22:58 +10:00
Angus Salkeld
b7ee2e9e6d TESTS: fix warning about unused functions
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:50:19 +10:00
Angus Salkeld
86db616209 Remove D_FORTIFY_SOURCE from check.
Can't seem to get this to work on F17.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:49:29 +10:00
Angus Salkeld
194b93678f Open shared mem file in /dev/shm only for linux
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:31:51 +10:00
Angus Salkeld
c0f52fb5c2 Don't use msg_flags on solaris (recvmsg).
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:29:10 +10:00
Angus Salkeld
e4d33aba40 Turn off attribute_section on solaris
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:26:15 +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
73731f0643 IPC: if the server returns EAGAIN or ETIMEOUT the check the connection
Mainly useful for shm, as the ringbuffer doesn't know the state
of the connection.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 13:46:58 +10:00
Angus Salkeld
b52f2e37b3 LOG: make it possible to fsync() on each file log.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-05 12:07:35 +10:00
Angus Salkeld
460cc70a8b IPC: make sure that the created callback happens before dispatches
This only happened on the socket ipc type.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 21:45:28 +10:00
Angus Salkeld
9956fe29ff LOG: fix the printing of %p in the blackbox
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 14:54:39 +10:00
Angus Salkeld
1e81530332 IPC: On bsd's use the notifier for responses
The point of this is to catch connection failures
more reliably.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-01 11:12:44 +10:00
Angus Salkeld
44f61b23bb IPC: interpret ECONNRESET and EPIPE as ENOTCONN
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-01 10:15:36 +10:00
Angus Salkeld
35a4421d23 cleanup some warnings
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-31 22:18:04 +10:00
Angus Salkeld
2f4fa09b1c config: use newer AC_COMPILE_IFELSE()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-31 22:08:16 +10:00
Angus Salkeld
9f90b16d06 blackbox: fix %p formatting
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 23:16:49 +10:00
Angus Salkeld
d280ddd6e4 LOG: put all fields in the blackbox (added priority and tags)
Fixes #36

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 22:23:22 +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
33b582aad7 Remove strerror out of check_funcs
We only use strerror_r

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 19:14:21 +10:00
Angus Salkeld
85b39906a9 RB: fix compiler warning.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 19:10:13 +10:00
Angus Salkeld
4208a4b88b Add replacement function stpcpy
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 19:10:13 +10:00
Angus Salkeld
369e2614a9 Add missing AC_TYPE_UINT16_T to configure.ac
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:44:19 +10:00
Angus Salkeld
fe8014b379 Use AC_FUNC_STRERROR_R and STRERROR_R_CHAR_P
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:41:43 +10:00
Angus Salkeld
76582618cf Add stpcpy strcasecmp to the check_funcs
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:33:46 +10:00
Angus Salkeld
2b49dc7030 Move some conditional defines into code (from the configure script)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:33:03 +10:00
Angus Salkeld
847741c853 Remove some unused configure checks
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 14:31:02 +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
aaae0a3c31 Check for union semun properly
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 13:35:48 +10:00
Angus Salkeld
531f7cdb7a Blackbox: provide more space for log messages when reading from the blackbox.
This is to allow for the header (16bytes and variable length function).
so if someone has a function name > 400 chars it will break. I
recon that will do:)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 13:34:15 +10:00
Andrew Beekhof
d670515da1 Add the blackbox reader manpage to the spec file 2012-05-28 12:49:01 +10:00
Andrew Beekhof
68b56a8eb5 Enable error logging for the blackbox reader 2012-05-28 12:35:28 +10:00
Andrew Beekhof
77fa3650dd RB: Read the file size into an initialized variable of the correct size 2012-05-28 12:25:10 +10:00
Angus Salkeld
c41f2c93a0 Add a tool to dump the blackbox.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 11:16:00 +10:00
Angus Salkeld
e0bc3a15ce RB: to be safer save the read and write pointers at the top of the blackbox
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-25 14:01:19 +10:00
Jim Meyering
32abe38ffd avoid unwarranted use of strncpy: use memcpy instead
* lib/log_format.c (qb_vsnprintf_deserialize): We know that there are
len or more non-NUL bytes in the source string, so it's clearer to
use memcpy.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-24 20:47:57 +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
4fdabe5bed RB: add an option to not use any semaphores
(brought over from the "speed" branch)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-24 19:16:59 +10:00