amqp: use the right buffer size for sstrncpy
if (payload == NULL)
{
ERROR ("mqtt plugin: malloc for payload buffer failed.");
+ sfree (vl.values);
return;
}
memmove (payload, msg->payload, msg->payloadlen);
const char* const default_server_fields[] = /* {{{ */
{
- "latency"
+ "latency",
"packetcache-hit",
"packetcache-miss",
"packetcache-size",
value_size = sizeof (value);
value_ptr = &value[0];
status = format_values (value_ptr, value_size, ds, vl, node->store_rates);
- pthread_mutex_lock (&node->lock);
if (status != 0)
return (status);
+ pthread_mutex_lock (&node->lock);
+
if (node->conn == NULL)
{
node->conn = redisConnectWithTimeout ((char *)node->host, node->port, node->timeout);