diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2000-10-23 21:43:52 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2000-10-23 21:43:52 +0000 |
commit | 5a5c2adcd8231b4fea656b54b907502aede93726 (patch) | |
tree | 8d71135a493bc98fb535b5e45c4d2008c98d8bfd /src/anonymous.c | |
parent | 670fad4a412cdf4022f27f2adc31460eaefbd2ea (diff) | |
download | tinyproxy-5a5c2adcd8231b4fea656b54b907502aede93726.tar.gz tinyproxy-5a5c2adcd8231b4fea656b54b907502aede93726.zip |
Added the new_anonymous initialize routine
Diffstat (limited to 'src/anonymous.c')
-rw-r--r-- | src/anonymous.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/anonymous.c b/src/anonymous.c index 76db940..d99d46e 100644 --- a/src/anonymous.c +++ b/src/anonymous.c @@ -1,4 +1,4 @@ -/* $Id: anonymous.c,v 1.2 2000-09-11 23:38:36 rjkaes Exp $ +/* $Id: anonymous.c,v 1.3 2000-10-23 21:43:52 rjkaes Exp $ * * Handles insertion and searches for headers which should be let through when * the anonymous feature is turned on. The headers are stored in a Ternary @@ -32,6 +32,12 @@ static TERNARY anonymous_tree; +int new_anonymous(void) +{ + anonymous_tree = ternary_new(); + return anonymous_tree; +} + int anon_search(char *s) { return ternary_search(anonymous_tree, s, NULL); @@ -39,10 +45,5 @@ int anon_search(char *s) void anon_insert(char *s) { - if (anonymous_tree == 0) { - if (TE_ISERROR(anonymous_tree = ternary_new())) - return; - } - ternary_insert(anonymous_tree, s, NULL); } |