summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2193369)
raw | patch | inline | side by side (parent: 2193369)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 6 Aug 2010 13:12:07 +0000 (15:12 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 6 Aug 2010 13:12:07 +0000 (15:12 +0200) |
Data transmission via AMQP works now! \o/
src/amqp.c | patch | blob | history |
diff --git a/src/amqp.c b/src/amqp.c
index 84bcc066efcf41a93a14e11d82640e62c0dc6e14..d3a53d7ab2a1844057f1d940fe911357ac38e0ef 100644 (file)
--- a/src/amqp.c
+++ b/src/amqp.c
received += frame.payload.body_fragment.len;
} /* while (received < body_size) */
- DEBUG ("amqp plugin: camqp_read_body: body = %s", body);
+ if (conf->format == CAMQP_FORMAT_COMMAND)
+ {
+ status = handle_putval (stderr, body);
+ if (status != 0)
+ ERROR ("amqp plugin: handle_putval failed with status %i.",
+ status);
+ return (status);
+ }
+ else if (conf->format == CAMQP_FORMAT_JSON)
+ {
+ ERROR ("amqp plugin: camqp_read_body: Parsing JSON data has not "
+ "been implemented yet. FIXME!");
+ return (0);
+ }
+ else
+ {
+ ERROR ("amqp plugin: camqp_read_body: Unknown format option (%i).",
+ conf->format);
+ return (EINVAL);
+ }
+ /* not reached */
return (0);
} /* }}} int camqp_read_body */