Angus Salkeld
59243fb68c
IPC: clean up the connection state checking
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-18 23:02:30 +11:00
Angus Salkeld
31d9f0900d
Use dgram sockets for message oriented communications
...
This is to prevent partial sends and gettting stuck in
retry loops.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-18 20:51:33 +11:00
Angus Salkeld
481bd0cf86
IPC: don't interpret EMSGSIZE and ENOMSG as a disconnect
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-18 20:51:33 +11:00
Angus Salkeld
3d7774816e
POLL: prevent a spin if the fd is not removed from the mainloop
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-18 20:51:33 +11:00
Angus Salkeld
2a03ea2af1
add TAGS and ~ files to .gitignore
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-18 20:51:33 +11:00
Angus Salkeld
a6797c5c19
docs: install qb-blackbox.8 if doxygen is not available.
...
fixes bug #54
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-13 15:45:40 +11:00
Angus Salkeld
9d2eca251b
IPC: seperate ipc_us.c into 2 files
...
Seperate into a setup file and a socket backend file, it was getting messy
and confusing. Also preparing for using DGRAM sockets.
This should not result in any logical changes.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-06 11:21:05 +11:00
Angus Salkeld
aa43bb94d1
IPC: move utility functions to unix.c
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-06 11:08:38 +11:00
Angus Salkeld
dde6a46a83
IPC: make sure we return a consistent error when the message is too big.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-25 11:20:19 +11:00
The Quarterback Library Release Team
848242a786
Bump the version to 0.14.4
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2013-01-17 14:06:48 +11:00
Angus Salkeld
45f181125c
LOG: prevent the last char of the blackbox message from getting lost.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-17 13:55:48 +11: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
728dc0a7c0
Merge pull request #52 from miz-take/prototype
...
Add the processing which remove notifier at skiplist_destroy function
2013-01-14 14:17:52 -08:00
Takeshi MIZUTA
37a6e7a5f1
Add the processing which remove notifier at skiplist_destroy function
2013-01-15 01:57:29 +09:00
Angus Salkeld
c344ee1233
Merge pull request #51 from miz-take/prototype
...
Add the processing which remove hash node and notifier at hashtable_destroy function
2013-01-13 14:08:01 -08:00
Takeshi MIZUTA
c684cdb55e
Add the processing which remove hash node and notifier at hashtable_destroy function
2013-01-14 03:39:47 +09:00
Angus Salkeld
eceee03a7b
Merge pull request #50 from miz-take/prototype
...
Unify to QB_TRUE/QB_FALSE a boolean value
2013-01-10 15:35:30 -08:00
Takeshi MIZUTA
4d1a98ad76
Unify to QB_TRUE/QB_FALSE a boolean value
2013-01-11 02:01:06 +09:00
Angus Salkeld
db8337e0eb
Document the default prefix in INSTALL
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-10 17:10:37 +11:00
Angus Salkeld
c9920e909b
Merge pull request #49 from miz-take/prototype
...
Unify the list processing with qb_list function
2013-01-08 16:00:13 -08:00
Takeshi MIZUTA
96e504f305
Unify the list processing with qb_list function
2013-01-09 02:04:20 +09:00
Angus Salkeld
0e4a53acc3
Add travis link to the readme.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-08 12:40:58 +11:00
Angus Salkeld
a7be9f9607
Merge pull request #48 from miz-take/prototype
...
Fix return code which is an error occurred at pthread function
2013-01-06 02:30:31 -08:00
miz-take
d365310882
Fix return code which is an error occurred at pthread function
2013-01-06 03:08:33 +09:00
Angus Salkeld
fe0e9a61a9
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>
2013-01-04 16:35:45 +11:00
Angus Salkeld
7b847a3b19
LOG: add a test for a padded hex int.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-04 15:56:59 +11:00
Angus Salkeld
185f9cff21
Fedora's splint has a strange syntax error, don't fail on it.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-04 15:56:02 +11:00
Angus Salkeld
739faa54fe
LOG: fix truncation in some messages that get padded.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-04 15:55:19 +11:00
Angus Salkeld
e07eccd6a6
Fix the blackbox formatter when specifing the string len/precision
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-12-19 10:51:54 +11:00
Angus Salkeld
aed8fe942e
Fix strlcpy and strlcat functions
...
These were not behaving as the man pages described.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-12-19 10:42:08 +11:00
Angus Salkeld
fe45c27ea6
IPC: don't over log on disconnect
...
Thanks grueni: https://github.com/asalkeld/libqb/pull/43
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-12-10 10:46:01 +11:00
Angus Salkeld
c69713e5f9
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>
2012-12-10 10:32:31 +11:00
Angus Salkeld
813dfb5fd2
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>
2012-12-06 11:59:33 +11:00
Angus Salkeld
30a7871646
LOG: fix the format comparison to avoid generating multiple entries.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-29 17:31:05 +11:00
Angus Salkeld
a5795f7d45
LOG: set the return code when calloc fails
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-23 10:24:56 +11:00
Angus Salkeld
709b32de43
IPC: call poll if we are mid message and get EAGAIN
...
So just manually call us_ready (poll) with a timeout of 50ms
to prevent cpu spin.
Also update qb_ipc_us_recv() to be simerlar.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-12 19:38:20 +11:00
Angus Salkeld
14f0250a89
Remove extra ";"
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-09 10:28:29 +11:00
Angus Salkeld
b535ef241b
IPC: set the error more correctly when qb_sys_mmap_file_open() fails.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-09 10:28:06 +11:00
Angus Salkeld
839d14f0ec
Make sure that mmap'ed files smaller than a page size are written to.
...
This is a test to make sure that there is actually enough memory
to back the requested shared memory.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-09 10:15: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
25828196a0
TEST: fix typo s/,/; in check_ipc.c
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-29 11:54:23 +11:00
The Quarterback Library Release Team
92ada8c4d1
Bump the library version.
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2012-10-29 10:02:04 +11:00
Andrew Beekhof
e771439c1c
IPC: Pass the timeout to poll() if the recv function returns EAGAIN
2012-10-23 11:14:59 +11:00
Angus Salkeld
6e130725e4
LOG: make the format comparison safe and sane
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-23 10:35:05 +11:00
Angus Salkeld
a623af9696
LOG: don't break on empty callsites, just ignore them
...
else we might miss some callsites.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-23 10:34:23 +11:00
Angus Salkeld
435d1dbce2
LOG: use the array callback to register new callsites
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-23 10:33:00 +11:00
Angus Salkeld
5e955579cb
array: add a mechanism to get a callback when a bin is allocated
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-23 10:31:47 +11:00
Angus Salkeld
79059bcae3
Solaris based operating systems don't define MSG_NOSIGNAL and SO_NOSIGPIPE.
...
They return SIGPIPE when send is used with a closed socket. A SIGPIPE handler
must be used or SIGPIPE should be set ignored with SIG_IGN. In this case send
returns -1 instead of a SIGPIPE. The setting to ignore SIGPIPE is global and
should be used only where it is absolutely necessary.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-22 11:15:05 +11:00
Angus Salkeld
bcba4a2983
Fix a crash in ptrie if you iterate over the map in the deleted notifier.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-09-12 10:39:17 +10:00