X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Famqp.c;h=467b7ff46041f76d618c0308eee50ce77cf6353e;hp=1adc62718e2a95c43fbcaa9f7ad456102019f734;hb=7111bb6df7628edce3a8e538b386fbe27633a191;hpb=9655d4a6d9fa2c4f02032759b831e93933d68bd9 diff --git a/src/amqp.c b/src/amqp.c index 1adc6271..467b7ff4 100644 --- a/src/amqp.c +++ b/src/amqp.c @@ -217,23 +217,23 @@ static char *camqp_strerror(camqp_config_t *conf, /* {{{ */ if (r.reply.id == AMQP_CONNECTION_CLOSE_METHOD) { amqp_connection_close_t *m = r.reply.decoded; char *tmp = camqp_bytes_cstring(&m->reply_text); - ssnprintf(buffer, buffer_size, "Server connection error %d: %s", - m->reply_code, tmp); + snprintf(buffer, buffer_size, "Server connection error %d: %s", + m->reply_code, tmp); sfree(tmp); } else if (r.reply.id == AMQP_CHANNEL_CLOSE_METHOD) { amqp_channel_close_t *m = r.reply.decoded; char *tmp = camqp_bytes_cstring(&m->reply_text); - ssnprintf(buffer, buffer_size, "Server channel error %d: %s", - m->reply_code, tmp); + snprintf(buffer, buffer_size, "Server channel error %d: %s", + m->reply_code, tmp); sfree(tmp); } else { - ssnprintf(buffer, buffer_size, "Server error method %#" PRIx32, - r.reply.id); + snprintf(buffer, buffer_size, "Server error method %#" PRIx32, + r.reply.id); } break; default: - ssnprintf(buffer, buffer_size, "Unknown reply type %i", (int)r.reply_type); + snprintf(buffer, buffer_size, "Unknown reply type %i", (int)r.reply_type); } return buffer; @@ -758,9 +758,9 @@ static int camqp_write(const data_set_t *ds, const value_list_t *vl, /* {{{ */ if (conf->routing_key != NULL) { sstrncpy(routing_key, conf->routing_key, sizeof(routing_key)); } else { - ssnprintf(routing_key, sizeof(routing_key), "collectd/%s/%s/%s/%s/%s", - vl->host, vl->plugin, vl->plugin_instance, vl->type, - vl->type_instance); + snprintf(routing_key, sizeof(routing_key), "collectd/%s/%s/%s/%s/%s", + vl->host, vl->plugin, vl->plugin_instance, vl->type, + vl->type_instance); /* Switch slashes (the only character forbidden by collectd) and dots * (the separation character used by AMQP). */ @@ -980,7 +980,7 @@ static int camqp_config_connection(oconfig_item_t *ci, /* {{{ */ if (publish) { char cbname[128]; - ssnprintf(cbname, sizeof(cbname), "amqp/%s", conf->name); + snprintf(cbname, sizeof(cbname), "amqp/%s", conf->name); status = plugin_register_write( cbname, camqp_write, &(user_data_t){