From b607ef5af6e8cb4789f3820224e0c20a3727d708 Mon Sep 17 00:00:00 2001 From: rzalamena Date: Sat, 27 Aug 2016 11:13:16 +0000 Subject: Kill p_instance from proc.c and remove static proc_id unused variables. To keep the debug functionality intact and correct we'll use the pid field in the imsg header to pass the instance number. Remember to always pass 'ps_instance + 1' otherwise libutil will fill imsg header pid field with the imsgbuf pid (which is the current process pid). ok reyk@ --- usr.sbin/httpd/server.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'usr.sbin/httpd/server.c') diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c index b3099d936c5..e07d33c2986 100644 --- a/usr.sbin/httpd/server.c +++ b/usr.sbin/httpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.93 2016/08/26 10:46:39 rzalamena Exp $ */ +/* $OpenBSD: server.c,v 1.94 2016/08/27 11:13:16 rzalamena Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -75,8 +75,6 @@ volatile int server_clients; volatile int server_inflight = 0; uint32_t server_cltid; -int proc_id; - static struct privsep_proc procs[] = { { "parent", PROC_PARENT, server_dispatch_parent }, { "logger", PROC_LOGGER, server_dispatch_logger } @@ -274,9 +272,6 @@ server_init(struct privsep *ps, struct privsep_proc *p, void *arg) if (config_init(ps->ps_env) == -1) fatal("failed to initialize configuration"); - /* Set to current prefork id */ - proc_id = p->p_instance; - /* We use a custom shutdown callback */ p->p_shutdown = server_shutdown; @@ -972,9 +967,6 @@ server_accept(int fd, short event, void *arg) server_clients++; SPLAY_INSERT(client_tree, &srv->srv_clients, clt); - /* Increment the per-relay client counter */ - //srv->srv_stats[proc_id].last++; - /* Pre-allocate output buffer */ clt->clt_output = evbuffer_new(); if (clt->clt_output == NULL) { -- cgit v1.2.3-59-g8ed1b