summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_time.h
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2020-06-22 06:08:30 +0000
committerAlan Antonuk <alan.antonuk@gmail.com>2020-06-22 06:08:30 +0000
commit8396d98fb7faec1268232bf9e92a3c5db2ddc721 (patch)
treea509b8cfee87809e268bc7c01a59c5d28cb6fd06 /librabbitmq/amqp_time.h
parent6f7f7932f46018925a95118b1173a9aa8d81a50d (diff)
downloadrabbitmq-c-coverity_scan.tar.gz
lib: correct amqp_time_from_now behavior at {0, 0}coverity_scan
Change behavior of amqp_time_from_now to set to the current timestamp when a struct timeval of {0, 0} is passed in instead of 0. This better aligns with how one would expect the function to work. As a byproduct this corrects an issue where amqp_consume_message would not return AMQP_STATUS_HEARTBEAT_TIMEOUT when a tv of {0, 0} and the heartbeat interval had passed. Fixes #557 in a more concise way.
Diffstat (limited to 'librabbitmq/amqp_time.h')
-rw-r--r--librabbitmq/amqp_time.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/librabbitmq/amqp_time.h b/librabbitmq/amqp_time.h
index 4478671..0d971a9 100644
--- a/librabbitmq/amqp_time.h
+++ b/librabbitmq/amqp_time.h
@@ -62,7 +62,6 @@ uint64_t amqp_get_monotonic_timestamp(void);
/* Get a amqp_time_t that is timeout from now.
* If timeout is NULL, an amqp_time_infinite() is created.
- * If timeout = {0, 0}, an amqp_time_immediate() is created.
*
* Returns AMQP_STATUS_OK on success.
* AMQP_STATUS_INVALID_PARAMETER if timeout is invalid
@@ -80,9 +79,6 @@ int amqp_time_from_now(amqp_time_t *time, const struct timeval *timeout);
*/
int amqp_time_s_from_now(amqp_time_t *time, int seconds);
-/* Create an immediate amqp_time_t */
-amqp_time_t amqp_time_immediate(void);
-
/* Create an infinite amqp_time_t */
amqp_time_t amqp_time_infinite(void);