| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
asan = address sanitizer
tsan = thread sanitizer
|
| |
|
|
|
|
|
| |
The -Wall -Wextra... etc should be prepended to any passed in CMAKE_C_FLAGS as
is done with gcc and others.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add select() based poll() implementation for platforms that either support this
better (Win32) or don't support poll().
|
|
|
|
|
|
| |
Get rid of amqp_poll_{read,write} and flatten the call-tree to amqp_poll with an
appropriate flag. Done in preparation for adding a select()-based
implementation of the amqp_poll() function.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
As a performance optimization in the send path, add an AMQP_SF_MORE flag
indicating that more data is intended to be sent, and that packets shouldn't be
sent out on the wire unless there is a full packet's worth of data available.
Use this to specify MSG_MORE to send() on Linux.
|
|
|
|
|
|
| |
Function amqp_ssl_socket_send() should return the number of bytes
written. Retruning AMQP_STATUS_OK on success will cause all
amqp_socket_send() with SSL socket implementation to behave incorrectly.
|
|
|
|
|
|
| |
Autotools build uses c90/gnu90. Add similar functionality for cmake
build. This will work for gcc and clang, while for other compilers the
checks will just fail and no additional flags will be added.
|
|
|
|
|
| |
If building with a compiler that does not support C99, this would raise
a warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to documentation SSL_connect() can return:
- 1 if handshake was successful or
- 0 or < 0 if handshake failed and connection was cleaned up or
communcation error occurred
When nonblocking flag is set on the socket and handshake is in progress,
SSL_connect() retruns -1 and sets error SSL_ERROR_WANT_READ. The test
will then skip the switch() branch, and proceed forward with hanshake
procedure in unfinished state. This may lead to certificate verification
failure, as should the handshake be interrupted too soon, no server
certificates would be received.
|
| |
|
|
|
|
|
|
| |
Remove scope local res variable that shadows the function local variable
defined in amqp_socket.c:1118. This removes a possible branch point that
triggered a return of uninitialized value.
|
|
|
|
| |
The helper macro makes it easier to add #if/#endif build time checks.
|
|
|
|
|
|
|
| |
Accessing usleep() requires _BSD_SOURCE feature test macro to be
set. However, _SVID_SOURCE is set as well, what will cause deprecation
warnings when building with glibc >= 2.20. The patch replaced usleep()
with nanosleep() to avoid these problems.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add amqp_merge_capabilities function that merges client-properties tables.
|
| |
|
| |
|
|
|
|
|
| |
These constants are already defined in the Win32, and they're being incorrectly
redefined by rabbitmq-c.
|
|
|
|
|
| |
If this project was Win32 only, I'd use them, but adding lots of ifdefs to kill
warnings doesn't make a whole lot of sense.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Check for recv heartbeats when blocking on sending to the socket. A blocked send
can indicate that the broker is applying backpressure to publishers, it could
also be that the TCP connection is dead, checking for recv heartbeats can give
an earlier indication that the connection is broken.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor frame encoding into its own function. This is in preparation for doing
heartbeats while waiting for the socket to become writable.
As a de-optimization: stop using writev for the body frames. This now requires
memcpy'ing the whole message body, which is an additional copy. On the flip side
this is already done behind the scenes on Linux and anything using OpenSSL. This
may also improve performance as fewer OS calls are made when writev doesn't
support SO_NOSIGNAL.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Refactor the heartbeat timeout code to hopefully simplify it and hopefully make
it less hairy to deal with in the future.
|
|
|
|
|
| |
Rename amqp_timer_t related functions to improve readability of the code and
clarify what they do.
|
|
|
|
| |
Rename the files to better reflect the functions that they contain.
|
|
|
|
| |
COPY_ONLY should be COPYONLY. (Yay developer warnings).
|
|
|
|
|
| |
This one only shows up when send() does a partial read, which is why it wasn't
caught immediately. Need some better tests for this.
|
| |
|