|
|
@ -1,4 +1,4 @@ |
|
|
|
/* $OpenBSD: control.c,v 1.11 2016/09/14 13:20:16 rzalamena Exp $ */ |
|
|
|
/* $OpenBSD: control.c,v 1.12 2017/01/09 14:04:31 krw Exp $ */ |
|
|
|
|
|
|
|
/* |
|
|
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
|
@ -142,9 +142,10 @@ control_connbyfd(int fd) |
|
|
|
{ |
|
|
|
struct ctl_conn *c; |
|
|
|
|
|
|
|
for (c = TAILQ_FIRST(&ctl_conns); c != NULL && c->ibuf.fd != fd; |
|
|
|
c = TAILQ_NEXT(c, entry)) |
|
|
|
; /* nothing */ |
|
|
|
TAILQ_FOREACH(c, &ctl_conns, entry) { |
|
|
|
if (c->ibuf.fd == fd) |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
return (c); |
|
|
|
} |
|
|
|