Skip to content

Commit

Permalink
router_transplant_queues: fix inversed logic, issue #204
Browse files Browse the repository at this point in the history
An embarassing logic error caused queues from totally unrelated servers
to be swapped, causing all kinds of random erroneously delivered
metrics.
  • Loading branch information
grobian committed Dec 31, 2016
1 parent ca9143c commit 611450a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
'include' directive doesn't care about rewrites.
* [Issue #241](https://github.com/grobian/carbon-c-relay/issues/241)
XXX characters being prepended to metrics when sent via UDP
* [Issue #204](https://github.com/grobian/carbon-c-relay/issues/204)
relay is sending data randomly while kill -HUP happens


# 2.3 (2016-11-07)
Expand Down
2 changes: 1 addition & 1 deletion router.c
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,7 @@ router_transplant_queues(router *new, router *old)

for (ns = new->srvrs; ns != NULL; ns = ns->next) {
for (os = old->srvrs; os != NULL; os = os->next) {
if (strcmp(server_ip(ns->server), server_ip(os->server)) &&
if (strcmp(server_ip(ns->server), server_ip(os->server)) == 0 &&
server_port(ns->server) == server_port(os->server) &&
server_ctype(ns->server) == server_ctype(os->server))
{
Expand Down

0 comments on commit 611450a

Please sign in to comment.