Hi,
On 20 Oct 2002 22:26:59 +1000
Robert Collins <robertc@squid-cache.org> wrote:
>> I want suggest one more bit to coding style (both C and C++):
>>
>> "Do not use TCP/IP fuctions names as variable names or
>> class/structures member names"
>
>Theres no need for this: there are other ways to override
>functions...
>
>> I try now to use some debugging via using
>> #define accept DebugAccept
>> etc.
>> Everything is work, exept for
>> #define connect DebugConnect
>One easy way is to implement your overriden in a lib file linked in
>after all the source files, before the libraries. This is the usual
>way
>to override system libraries.
hehe. And how shall I call original function ?
I what to write to some log the input parameters, call original, write
output and return code. When some error will occured, I want rerun
squid and dosn't call tcp/ip functions, but instead read events wfrom
log.
>
>Also, in squid the system tcp calls should - never - be used outside
>of
>comm*.cc, as they need to be overridable on a per OS basis.
Now they are in
comm_select.cc
comm.cc
cachemgr.cc
client.cc
dns_internal.cc
rfc1035.cc
icmp.cc
ipc.cc
htcp.cc
etc.
SY,
Evgeny Kotsuba
Received on Sun Oct 20 2002 - 16:23:36 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:58 MST