summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/relayd.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2008-01-31 09:56:30 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2008-01-31 09:56:30 +0000
commit0548783dd32716f5c917173e44b9dd2e9ea6cd56 (patch)
tree29af0c0962e1fc2cfaee13cf6e40a81d18f2cec9 /usr.sbin/relayd/relayd.c
parentdb36350faf7c9e1b9d9703c1290951d106211304 (diff)
add prefixes to names of structure elements to make it easier to grep
for code, next struct relay. knf long line fixes will follow later. ok thib@
Diffstat (limited to 'usr.sbin/relayd/relayd.c')
-rw-r--r--usr.sbin/relayd/relayd.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index 94ced9edf41..ce24c3bed1d 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.67 2008/01/31 09:33:39 reyk Exp $ */
+/* $OpenBSD: relayd.c,v 1.68 2008/01/31 09:56:28 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -446,7 +446,7 @@ purge_config(struct relayd *env, u_int8_t what)
struct rdr *rdr;
struct address *virt;
struct protocol *proto;
- struct relay *rly;
+ struct relay *rlay;
struct session *sess;
if (what & PURGE_TABLES && env->sc_tables != NULL) {
@@ -470,20 +470,20 @@ purge_config(struct relayd *env, u_int8_t what)
}
if (what & PURGE_RELAYS && env->sc_relays != NULL) {
- while ((rly = TAILQ_FIRST(env->sc_relays)) != NULL) {
- TAILQ_REMOVE(env->sc_relays, rly, entry);
- while ((sess = SPLAY_ROOT(&rly->sessions)) != NULL) {
+ while ((rlay = TAILQ_FIRST(env->sc_relays)) != NULL) {
+ TAILQ_REMOVE(env->sc_relays, rlay, rl_entry);
+ while ((sess = SPLAY_ROOT(&rlay->rl_sessions)) != NULL) {
SPLAY_REMOVE(session_tree,
- &rly->sessions, sess);
+ &rlay->rl_sessions, sess);
free(sess);
}
- if (rly->bev != NULL)
- bufferevent_free(rly->bev);
- if (rly->dstbev != NULL)
- bufferevent_free(rly->dstbev);
- if (rly->ssl_ctx != NULL)
- SSL_CTX_free(rly->ssl_ctx);
- free(rly);
+ if (rlay->rl_bev != NULL)
+ bufferevent_free(rlay->rl_bev);
+ if (rlay->rl_dstbev != NULL)
+ bufferevent_free(rlay->rl_dstbev);
+ if (rlay->rl_ssl_ctx != NULL)
+ SSL_CTX_free(rlay->rl_ssl_ctx);
+ free(rlay);
}
free(env->sc_relays);
env->sc_relays = NULL;
@@ -762,8 +762,8 @@ relay_find(struct relayd *env, objid_t id)
{
struct relay *rlay;
- TAILQ_FOREACH(rlay, env->sc_relays, entry)
- if (rlay->conf.id == id)
+ TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
+ if (rlay->rl_conf.id == id)
return (rlay);
return (NULL);
}
@@ -774,8 +774,8 @@ session_find(struct relayd *env, objid_t id)
struct relay *rlay;
struct session *con;
- TAILQ_FOREACH(rlay, env->sc_relays, entry)
- SPLAY_FOREACH(con, session_tree, &rlay->sessions)
+ TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
+ SPLAY_FOREACH(con, session_tree, &rlay->rl_sessions)
if (con->id == id)
return (con);
return (NULL);
@@ -849,8 +849,8 @@ relay_findbyname(struct relayd *env, const char *name)
{
struct relay *rlay;
- TAILQ_FOREACH(rlay, env->sc_relays, entry)
- if (strcmp(rlay->conf.name, name) == 0)
+ TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
+ if (strcmp(rlay->rl_conf.name, name) == 0)
return (rlay);
return (NULL);
}