diff --git a/src/amqp.c b/src/amqp.c
index c9929dc0b12e00a9a925ebc6c98c559162a27167..9c8c6e537c6cb1d2f3907402f7c602e2f8b326b6 100644 (file)
--- a/src/amqp.c
+++ b/src/amqp.c
camqp_config_t *conf = user_data;
int status;
+ cdtime_t interval = plugin_get_interval ();
+
while (subscriber_threads_running)
{
amqp_frame_t frame;
struct timespec ts_interval;
ERROR ("amqp plugin: camqp_connect failed. "
"Will sleep for %.3f seconds.",
- CDTIME_T_TO_DOUBLE (interval_g));
- CDTIME_T_TO_TIMESPEC (interval_g, &ts_interval);
+ CDTIME_T_TO_DOUBLE (interval));
+ CDTIME_T_TO_TIMESPEC (interval, &ts_interval);
nanosleep (&ts_interval, /* remaining = */ NULL);
continue;
}
struct timespec ts_interval;
ERROR ("amqp plugin: amqp_simple_wait_frame failed. "
"Will sleep for %.3f seconds.",
- CDTIME_T_TO_DOUBLE (interval_g));
+ CDTIME_T_TO_DOUBLE (interval));
camqp_close_connection (conf);
- CDTIME_T_TO_TIMESPEC (interval_g, &ts_interval);
+ CDTIME_T_TO_TIMESPEC (interval, &ts_interval);
nanosleep (&ts_interval, /* remaining = */ NULL);
continue;
}
camqp_config_free (conf);
pthread_exit (NULL);
+ return (NULL);
} /* }}} void *camqp_subscribe_thread */
static int camqp_subscribe_init (camqp_config_t *conf) /* {{{ */
tmp = subscriber_threads + subscriber_threads_num;
memset (tmp, 0, sizeof (*tmp));
- status = pthread_create (tmp, /* attr = */ NULL,
+ status = plugin_thread_create (tmp, /* attr = */ NULL,
camqp_subscribe_thread, conf);
if (status != 0)
{
else if (conf->format == CAMQP_FORMAT_GRAPHITE)
{
status = format_graphite (buffer, sizeof (buffer), ds, vl,
- conf->prefix, conf->postfix, conf->escape_char);
+ conf->prefix, conf->postfix, conf->escape_char,
+ conf->store_rates);
if (status != 0)
{
ERROR ("amqp plugin: format_graphite failed with status %i.",