summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e55601)
raw | patch | inline | side by side (parent: 8e55601)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 6 Aug 2010 12:10:46 +0000 (14:10 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 6 Aug 2010 12:10:46 +0000 (14:10 +0200) |
src/amqp.c | patch | blob | history |
diff --git a/src/amqp.c b/src/amqp.c
index 07a800bdf6c82f17568ba384a61f033b831caf24..eb54795069f1bcc17f39d2571981d50137f49e99 100644 (file)
--- a/src/amqp.c
+++ b/src/amqp.c
char *password;
char *exchange;
- char *exchange_type;
- char *queue;
char *routingkey;
- uint8_t delivery_mode;
+ /* publish only */
+ uint8_t delivery_mode;
_Bool store_rates;
+ /* subscribe only */
+ char *exchange_type;
+ char *queue;
+
amqp_connection_state_t connection;
pthread_mutex_t lock;
};
conf->user = NULL;
conf->password = NULL;
conf->exchange = NULL;
- conf->exchange_type = NULL;
- conf->queue = NULL;
conf->routingkey = NULL;
+ /* publish only */
conf->delivery_mode = CAMQP_DM_VOLATILE;
conf->store_rates = 0;
+ /* subscribe only */
+ conf->exchange_type = NULL;
+ conf->queue = NULL;
+ /* general */
conf->connection = NULL;
pthread_mutex_init (&conf->lock, /* attr = */ NULL);
/* }}} */
status = cf_util_get_string (child, &conf->queue);
else if (strcasecmp ("RoutingKey", child->key) == 0)
status = cf_util_get_string (child, &conf->routingkey);
- else if (strcasecmp ("Persistent", child->key) == 0)
+ else if ((strcasecmp ("Persistent", child->key) == 0) && publish)
{
_Bool tmp = 0;
status = cf_util_get_boolean (child, &tmp);