Alex Rousskov [Thu, 20 Mar 2008 17:48:37 +0000 (11:48 -0600)]
Importing CVS squid3-ecap branch:
lib/Makefile.am
Added libLtdl to SUBDIRS if USE_LOADABLE_MODULES.
src/ICAP/ICAPModXact.h
src/ICAP/ICAPServiceRep.h
When USE_ECAP_AS_ICAP_HACK macro is defined, enable a temporary
hack that uses ICAP class names to implement some of the eCAP
classes. This is necessary to hide eCAP/ICAP distinction from
Squid core. Hiding the distinction is necessary to avoid
numerous conflicts when this branch is merged with async call
branch changes.
Once the branches are merged, the hack will be removed. Since
we currently #define eCAP class names to match those of ICAP
classes, the changes at that time should not be significant:
remove renaming #defines and adjust autotools meta files to
allow both ICAP and eCAP co-exist.
configure.in
src/Makefile.am
Enable eCAP support if loadable module support is enabled.
Eventually, we may want to control eCAP support directly.
Added eCAP directory to the Makefile. The eCAP directory
contents will be committed later.
SPONSORS
Added eCAP sponsor.
src/Makefile.am
When eCAP is enabled, to support USE_ECAP_AS_ICAP_HACK, ignore
ICAP files that eCAP overwrites.
configure.in
Added --enable-ecap option to control eCAP support explicitly.
Added consistency checks for the combination of --enable-ecap,
--enable-icap-client, and --disable-loadable-modules options.
Define USE_ECAP_AS_ICAP_HACK macro to enable a temporary hack
that uses ICAP class names to implement some of the eCAP
classes. This is necessary to hide eCAP/ICAP distinction from
Squid core. Hiding the distinction is necessary to avoid
numerous conflicts when this branch is merged with async call
branch changes.
Once the branches are merged, the hack will be removed. Since
we currently #define eCAP class names to match those of ICAP
classes, the changes at that time should not be significant:
remove renaming #defines and adjust autotools meta files to
allow both ICAP and eCAP co-exist.
Added basic support for Libtool ltdl. Libltdl directory is not
committed yet because I want to investigate whether it can be
moved from root to lib/. Bootstrap.sh currently strips a large
copying file from that directory but does not attempt to move
the directory itself.
The configure options will need to be changed according to
squid-dev discussion: we should assume that ltdl is always used
if modules are used, and we should have a --disable-modules
option.
The code works with a dummy module: Squid was able to load and
unload using LoadableModule, an ltdl wrapper class from Spicer.
I have not committed that wrapper yet.
Moved Libtool libltdl directory to lib/libLtdl to keep all
3rd-party libs in one place. Will commit the lib/libLtdl
directory itself soon.
Bootstrap.sh currently moves all files from the generated
libltdl into lib/libLtdl. A better approach may be to use the
--ltdl option of libtoolize. Will investigate.
Changed configure options to assume that ltdl is always used if
modules are used.
Amos Jeffries [Thu, 20 Mar 2008 11:30:19 +0000 (23:30 +1200)]
3.1 Cleanups pt 1: Add testheaders.sh script
This script automatically tests all .h files in any directory it is passed
(relative to curent make directory) using the compiler options it is also passed.
It should be integrated in to the unit-testing in every Makefile.am so that
it provides dependancy tree testing of all .h without any additional work by
developers, maintainers, or testers.
- puts testheaders.sh script to use in many Makefile.am
(tried for all subdirs tested, but some may have escaped)
- fixes many include problems where .h were not self-sufficient.
They required .cc or other .h files using them to include additional .h
Now any given .h will include all objects it requires for compiling.
(linking is still not guaranteed by this alone)
- References SQUIDHOSTNAMELEN properly as defined by RFC 2181.
Now also split into a proper rfc2181.h for use.
(obsoleting many dependencies on squid.h all by itself)
- Migrates dlink_* (squid custom double-linked-list code) into new object.
(releasing many dependencies on squid.h, structs.h, and protos.h)
- Migrates the SquidConfig* types into SquidConfig.cc, now built into libsquid.la
(releasing many dependencies on structs.h, and globals.*)
- removes squid.h includes from many unit-tests
(releasing them from link-dependencies, .o links not yet cleaned up)
Henrik Nordstrom [Thu, 20 Mar 2008 05:15:04 +0000 (06:15 +0100)]
At the sprint the issue about our current 10ms main loop timeout came
up, and it was suggested the problem most likely have been fixed in
HEAD. And even if it hasn't been fixed it's something which should be
fixed rather than plastered over by spinning around on a short timeout
when there is no activity..
This backs out the change to revert the change..
Alex commit reversing the change said:
revno: 8332
committer: rousskov
branch nick: HEAD
timestamp: Tue 2007-07-24 01:55:21 +0000
message:
Reversed bug #2011 fix because it may slow down ICAP, BodyPipe, and other code
using zero-delay events to implement "asynchronous" calls.
The code should probably be rewritten (a) to avoid any waiting/blocking when
there are ready events and (b) to allow waiting longer when there are no ready
events.
Henrik Nordstrom [Sat, 15 Mar 2008 18:03:11 +0000 (19:03 +0100)]
First stab at header cloning. The motivation behind this is to get rid
of the need of buffering response headers in the server side code
(client_side_reply). A positive sideeffect is that this should also
improve performance considerably.
Author: Robert Collins <robertc@robertcollins.net>
This is most of a changeover of scripts for squid 3 trunk to use bzr;
the missing bit appears to need a bzr 1.1 (to do 'rdiff' basically) or
thereabouts, I'll look into that in a bit. I'm not sure that the
unconverted cvs calls will actually trigger with our current setup or
not.
amosjeffries [Wed, 27 Feb 2008 04:49:32 +0000 (04:49 +0000)]
Merge auto-docs branch. pt 2
- Updates build config (dyn,html) for portable dynamic and static docs
- Merges all code-comment changes
- Updates some function parameter types to reduce silent conversions
- Fixes some typos.
- Migrates some TODO items to the automatic TODO list.
rousskov [Wed, 27 Feb 2008 01:43:30 +0000 (01:43 +0000)]
Bug #2224 fix: reentrant debugging crashes Squid
Reentrant debugging occurs when something being written into the debugging
stream produces its own debugging. For example, a field accessor method may
make cbdata-validation calls, which would produce debugging. Logging such
field would crash Squid if sufficiently high debugging level is enabled.
With this change, the Debug methods detect reentrant calls and mostly ignore
them, allowing the caller to append debugging information to the existing
debug stream. A short debugging label is added before and after the reentrant
debugging message to reduce confusion that overlapping debugging statements
may cause during log analysis.
rousskov [Tue, 26 Feb 2008 07:24:00 +0000 (07:24 +0000)]
Added a CPPUNIT assertion to test whether a failed CPPUNIT test case properly
destructs local objects on exit.
If a previous test case fails for any reason, the new assertion will fail
instead of store_dir.cc aborting. This may save us from tracking non-existent
StoreController initialization bugs.
rousskov [Tue, 26 Feb 2008 07:22:07 +0000 (07:22 +0000)]
Bug #2240 fix: AsyncCall-related unit tests fail
Removed EventDispatcher references, disabling the following test cases:
testRunOnce, testRegisterDispatcher, testRegisterEngine,
testEngineTimeout, testStopOnIdle.
Eventually, we will add AsyncCallQueue test cases, but EventLoop testing
does not have to wait for that.
rousskov [Tue, 26 Feb 2008 07:21:13 +0000 (07:21 +0000)]
Bug #2240 fix: AsyncCall-related unit tests fail
Removed EventDispatcher references, deleting testDispatch test case.
The test cases now use the AsyncCall queue to force call firing
without a real main loop.
Eventually, we will add AsyncCallQueue test cases, but event testing
does not have to wait for that.
rousskov [Tue, 26 Feb 2008 07:19:29 +0000 (07:19 +0000)]
Bug #2240 fix: AsyncCall-related unit tests fail
Removed libsquid.la from SWAP_TEST_LDADD: Store-related test cases use comm
stubs. They must not include libsquid which provides the true comm code.
Added AsyncCall* sources to selected test cases: Every test case that needs
event.cc also needs AsyncCallQueue and AsyncCall. Placed all three in
$TEST_CALL_SOURCES variable and used as needed. This prevents test case
compilation failures due to undefined call-related symbols.
I suspect that there are more files in the same "calls" group, but it would be
a lot easier to identify them once we clean src/ up and group files into
subdirs and libraries.
rousskov [Tue, 26 Feb 2008 07:15:48 +0000 (07:15 +0000)]
Protos.h said to remove HttpRequestMethod.h #include when no method_t is used
by prototypes. Removed the header and adjusted other source files that relied
on that header being in protos.h.
serassio [Wed, 20 Feb 2008 03:15:09 +0000 (03:15 +0000)]
Author: Klaubert Herr <klaubert@gmail.com>
Patch to strip kerberos realm from username
This patch add a new option to squid_ldap_group to strip kerberos realm from
username received from squid.
This is useful when you make kerberos authentication on squid, and try to
authorize the user using ldap in MS Active Directory, quering for
sAMAccountName.
rousskov [Tue, 19 Feb 2008 04:54:07 +0000 (04:54 +0000)]
Bug 2224 fix: reentrant debugging crashes Squid
This patch does not fix the true/core problem, but it changes some pieces of
code that expose that problem. There are probably other pieces not masked
by this patch.
rousskov [Sun, 17 Feb 2008 00:41:55 +0000 (00:41 +0000)]
When METHOD_ENUM_END and METHOD_OTHER were reordered, the rest of the
code was not reviewed and an infinite loop in
clientReplyContext::purgeAllCached was created.
Polished the ++ operator and added a TODO to replace it eventually.
rousskov [Sat, 16 Feb 2008 00:26:00 +0000 (00:26 +0000)]
Bug 2225 fix: method CONNECT acl wrongly applied to method GET
The method comparison operator was broken for all methods other than "other".
I did not check whether we need to do case-insensitive compare of method
strings when the method is "other". We have to if Squid does not convert all
unknown methods to uppercase.