X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Famqp1.c;h=a7fd26be229121af860d353f0dd7de597a954907;hb=25824c65721f0f21cadf1607fad367c7e7831816;hp=635af0f7cfe4d921e73a9bc56ef63dfe2ff6cfcd;hpb=2a8f44ef75deb13f3152d1f2dd73253cb7aaf442;p=collectd.git diff --git a/src/amqp1.c b/src/amqp1.c index 635af0f7..a7fd26be 100644 --- a/src/amqp1.c +++ b/src/amqp1.c @@ -26,12 +26,12 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" -#include "utils_cmd_putval.h" -#include "utils_deq.h" -#include "utils_format_graphite.h" -#include "utils_format_json.h" +#include "utils/cmds/putval.h" +#include "utils/common/common.h" +#include "utils/deq/deq.h" +#include "utils/format_graphite/format_graphite.h" +#include "utils/format_json/format_json.h" #include "utils_random.h" #include @@ -372,7 +372,7 @@ static int amqp1_notify(notification_t const *n, } cd_message_t *cdm = malloc(sizeof(*cdm)); - if (cdm == NULL ){ + if (cdm == NULL) { ERROR("amqp1 plugin: notify failed"); return -1; } @@ -471,15 +471,16 @@ static int amqp1_write(const data_set_t *ds, const value_list_t *vl, /* {{{ */ format_json_initialize((char *)cdm->mbuf.start, &bfill, &bfree); format_json_value_list((char *)cdm->mbuf.start, &bfill, &bfree, ds, vl, instance->store_rates); - status= format_json_finalize((char *)cdm->mbuf.start, &bfill, &bfree); + status = format_json_finalize((char *)cdm->mbuf.start, &bfill, &bfree); if (status != 0) { - ERROR("amqp1 plugin: format_json_finalize failed with status %i.", status); + ERROR("amqp1 plugin: format_json_finalize failed with status %i.", + status); cd_message_free(cdm); - return(status); + return status; } cdm->mbuf.size = strlen(cdm->mbuf.start); if (cdm->mbuf.size >= BUFSIZE) { - ERROR("amqp1 plugin: format graphite failed"); + ERROR("amqp1 plugin: format json failed"); cd_message_free(cdm); return -1; }