Commit Graph

27 Commits

Author SHA1 Message Date
rofl0r
3230ce0bc2 anonymous: fix segfault loading config item
unlike other functions called from the config parser code,
anonymous_insert() accesses the global config variable rather than
passing it as an argument. however the global variable is only set
after successful loading of the entire config.

we fix this by adding a conf argument to each anonymous_* function,
passing the global pointer in calls done from outside the config
parser.

fixes #292
2020-03-16 13:19:39 +00:00
rofl0r
c63d5d26b4 access config via a pointer, not a hardcoded struct address
this is required so we can elegantly swap out an old config for a
new one in the future and remove lots of boilerplate from config
initialization code.

unfortunately this is a quite intrusive change as the config struct
was accessed in numerous places, but frankly it should have been
done via a pointer right from the start.

right now, we simply point to a static struct in main.c, so there
shouldn't be any noticeable changes in behaviour.
2020-01-15 16:09:41 +00:00
Michael Adam
7290691142 Move definition of "struct config_s" from main.h to conf.h
Michael
2009-12-07 22:33:27 +01:00
Michael Adam
d0a91c2f9b Add the anonymous_map hasmap to the config struct.
Michael
2009-12-07 00:22:53 +01:00
Mukund Sivaraman
7b9234f394 Indent code to Tinyproxy coding style
The modified files were indented with GNU indent using the
following command:

indent -npro -kr -i8 -ts8 -sob -l80 -ss -cs -cp1 -bs -nlps -nprs -pcs \
    -saf -sai -saw -sc -cdw -ce -nut -il0

No other changes of any sort were made.
2009-09-15 01:11:25 +05:30
Mukund Sivaraman
a21cd7e3ed Rename tinyproxy.[ch] to main.[ch] 2009-08-07 03:42:53 +05:30
Michael Adam
2ca1f9027b add const to the key argument of anonymous_insert().
Michael
2009-08-05 00:15:04 +02:00
Michael Adam
c6475974b5 add const to the key argument for anonymous_search().
Michael
2009-08-05 00:14:20 +02:00
Mukund Sivaraman
024b317de0 Convert tabs to spaces 2008-12-08 13:39:44 +00:00
Mukund Sivaraman
a257703e59 Reformat code to GNU coding style
This is a commit which simply ran all C source code files
through GNU indent. No other modifications were made.
2008-12-01 15:01:11 +00:00
Mukund Sivaraman
249d4b7f33 Updated copyright, license notices in source code
The notices have been changed to a more GNU look. Documentation
comments have been separated from the copyright header. I've tried to
keep all copyright notices intact. Some author contact details have
been updated.
2008-05-24 13:35:49 +05:30
Robert James Kaes
c0299e1868 * [Indent] Ran Source Through indent
I re-indented the source code using indent with the following options:

indent -kr -bad -bap -nut -i8 -l80 -psl -sob -ss -ncs

There are now _no_ tabs in the source files, and all indentation is
eight spaces.  Lines are 80 characters long, and the procedure type is
on it's own line.  Read the indent manual for more information about
what each option means.
2005-08-15 03:54:31 +00:00
Robert James Kaes
a59117c7ca * Updated Copyright Email Addresses
Updated the copyright email addresses for Robert James Kaes.  The
users.sourceforge.net address should always exist.
2005-07-12 17:39:44 +00:00
Robert James Kaes
451fad1ed2 Changed the header includes around to reflect the new source layout. 2002-05-23 18:20:27 +00:00
Robert James Kaes
b5df4f1cf0 hashmap_search() only takes two arguments, so removed the unneeded NULL. 2002-04-25 18:52:09 +00:00
Robert James Kaes
c722851bce Cleaned up the return values of the two anonymous functions to make the
code cleaner and smaller.
2002-04-16 03:19:19 +00:00
Robert James Kaes
7409281e34 Replaced the internally used linked list with a call to the hashmap
module.  Code reuse is a good thing.
2002-04-09 20:04:39 +00:00
Robert James Kaes
cad9a5d11b Switched from using the ternary tree to a simple linked list. 2001-12-15 20:02:59 +00:00
Robert James Kaes
787ece6c01 Reformated text. 2001-11-22 00:31:10 +00:00
Robert James Kaes
fffdc76681 Made is_anonymous_enabled() an inline function. 2001-11-05 15:24:42 +00:00
Robert James Kaes
4ac03908fc Header reorganization. Basically all system headers are now included in
tinyproxy.h and all the other files include the tinyproxy.h header. This
moves all the dependancy issues into one file.
2001-10-25 17:27:39 +00:00
Robert James Kaes
849345e88b Removed the anon_new() function and moved it's functionality into
anonymous_insert(). Also renamed all the anon_* functions to anonymous_*
function.
2001-08-26 21:07:27 +00:00
Robert James Kaes
df52296674 Updated the return type for new_anonymous(). 2001-05-27 02:21:37 +00:00
Robert James Kaes
d32e0d1ccb Added ASSERT statements. 2001-05-23 18:01:23 +00:00
Robert James Kaes
5a5c2adcd8 Added the new_anonymous initialize routine 2000-10-23 21:43:52 +00:00
Robert James Kaes
55185db499 Removed the ternary tree code from these files and made it a separate
module.
2000-09-11 23:38:36 +00:00
Robert James Kaes
b1e97bd24f Moved the anonymous header code into it's own file to make it easier to
update.
2000-03-31 19:56:55 +00:00