summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ldapd/control.c28
-rw-r--r--usr.sbin/ldapd/ldapd.h4
2 files changed, 3 insertions, 29 deletions
diff --git a/usr.sbin/ldapd/control.c b/usr.sbin/ldapd/control.c
index 5652506167e..fb3a0226e7d 100644
--- a/usr.sbin/ldapd/control.c
+++ b/usr.sbin/ldapd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.2 2010/06/23 12:40:19 martinh Exp $ */
+/* $OpenBSD: control.c,v 1.3 2010/06/27 16:24:17 martinh Exp $ */
/*
* Copyright (c) 2010 Martin Hedenfalk <martin@bzero.se>
@@ -42,7 +42,6 @@
struct ctl_connlist ctl_conns;
struct ctl_conn *control_connbyfd(int);
-struct ctl_conn *control_connbypid(pid_t);
void control_close(int);
void
@@ -276,12 +275,9 @@ control_dispatch_imsg(int fd, short event, void *arg)
if (imsg.hdr.len != IMSG_HEADER_SIZE + sizeof(verbose))
break;
- memcpy(&verbose, imsg.data, sizeof(verbose));
-
+ bcopy(imsg.data, &verbose, sizeof(verbose));
imsg_compose_event(iev_ldapd, IMSG_CTL_LOG_VERBOSE,
0, 0, -1, &verbose, sizeof(verbose));
- memcpy(imsg.data, &verbose, sizeof(verbose));
- control_imsg_forward(&imsg);
log_verbose(verbose);
break;
@@ -296,23 +292,3 @@ control_dispatch_imsg(int fd, short event, void *arg)
imsg_event_add(&c->iev);
}
-void
-control_imsg_forward(struct imsg *imsg)
-{
- struct ctl_conn *c;
-
- TAILQ_FOREACH(c, &ctl_conns, entry)
- if (c->flags & CTL_CONN_NOTIFY)
- imsg_compose(&c->iev.ibuf, imsg->hdr.type, 0,
- imsg->hdr.pid, -1, imsg->data,
- imsg->hdr.len - IMSG_HEADER_SIZE);
-}
-
-void
-control_end(struct ctl_conn *c)
-{
- imsg_compose(&c->iev.ibuf, IMSG_CTL_END, 0, c->iev.ibuf.pid,
- -1, NULL, 0);
- imsg_event_add(&c->iev);
-}
-
diff --git a/usr.sbin/ldapd/ldapd.h b/usr.sbin/ldapd/ldapd.h
index e4c1416973a..648e7f3cbe1 100644
--- a/usr.sbin/ldapd/ldapd.h
+++ b/usr.sbin/ldapd/ldapd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldapd.h,v 1.9 2010/06/27 16:01:08 martinh Exp $ */
+/* $OpenBSD: ldapd.h,v 1.10 2010/06/27 16:24:17 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -490,9 +490,7 @@ void control_init(struct control_sock *);
void control_listen(struct control_sock *);
void control_accept(int, short, void *);
void control_dispatch_imsg(int, short, void *);
-void control_imsg_forward(struct imsg *);
void control_cleanup(struct control_sock *);
-void control_end(struct ctl_conn *c);
/* filter.c */
int ldap_matches_filter(struct ber_element *root,