summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 76cc183)
raw | patch | inline | side by side (parent: 76cc183)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 22 Mar 2010 18:58:33 +0000 (19:58 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 4 Aug 2010 13:13:50 +0000 (15:13 +0200) |
src/amqp.c | patch | blob | history |
diff --git a/src/amqp.c b/src/amqp.c
index 23526e2eb1c820196c03c57aca0bfb6e611936b7..95cded7a42d4da97e97dc93e2f0bab644c28ec90 100644 (file)
--- a/src/amqp.c
+++ b/src/amqp.c
return (config_set(&host, value));
else if(strcasecmp(key, "port") == 0)
{
- port = atoi(value);
+ int tmp;
+
+ tmp = service_name_to_port_number (value);
+ if (tmp <= 0)
+ {
+ ERROR ("AMQP plugin: Cannot parse `%s' as a "
+ "service name (port number).", value);
+ return (1);
+ }
+
+ port = tmp;
return (0);
}
else if (strcasecmp(key, "vhost") == 0)