Removed some uses of RefCount::getRaw() in DelayPool.cc

2007-04-22 Thread Tsantilas Christos
Hi Duane,

 I think there is an error in DelayPool.cc file and squid3 does not
compiles if delay pools are enabled.
The fix is:

--- DelayPool.cc20 Apr 2007 22:51:19 -  1.6
+++ DelayPool.cc22 Apr 2007 07:21:19 -
@@ -69,7 +69,7 @@
 void
 DelayPool::dump (StoreEntry *entry, unsigned int i) const
 {
-if (!theComposite() != NULL)
+if (theComposite() != NULL)
 return;

 storeAppendPrintf(entry, delay_class %d %s\n, i + 1,
pool-theClassTypeLabel());



Duane Wessels wrote:
 wessels 2007/04/20 16:24:07 MDT
 
   
   Log:
   Removed some uses of RefCount::getRaw()
   
   We can compare RefCount pointers to NULL without using getRaw() as long
   as the RefCount pointer is on the left, and NULL is on the right.
   
   .




Re: Debug-Sections for Release

2007-04-22 Thread Amos Jeffries

Amos Jeffries wrote:

This is a cleanup of the published Debug Sections in Squid 3.0.

Source files are only altered in the commented DEBUG: areas. All changes 
are to better prepare these sections for automatic processing. Some are 
to bring code sections marked with unknown (ie section ??) up to date 
by marking with the actual section that is already being used in the code.
Have also updated the mk-debugs.sh patterns to include more inclusive 
filepath expansions actually used for locating and sorting these DEBUG: 
tags.




So has anyone with approval ability looked at auditing this for 
inclusion in HEAD yet?


Amos



Re: debug statements to debugs statements

2007-04-22 Thread Tsantilas Christos
I do a first conversion from debug statements to debugs statements.
The patch is big (~750K) to post it to mailing list so I put the result
here:
http://www.chtsanti.net/others/CONVER_DEBUGS.diff
I hope that it is something needed for squid3 because the conversion
takes a lot of my time (specially when you have to merge with many
changes in main squid3 head)..

My Comments:
1) Should I create a temporary branch? If squid developers decide that
this work needed, will be easier the merging with Duane works for large
objects and the merging with main squid code.

2)  I did not format the result. I try to run the astyle
(version:1.20.2) and it changed too many things in code. Moreover the
formated code I took as result in some cases was really bad
   Which version of the astyle used in squid3?

3) I did not convert the debugs statements which have formating strings
with field width or precision modifiers. The reason is that I am not so
sure that the result will be really better. For example a printf
statement like the following:
 printf(Float:%.2f, Hex Integer:%x  Dec Integer: %05d \n\n,2.345,
13,13);

using iostreams can be written as:
 cout   Float: 
  setprecision(3)  2.345 
   ,Hex Integer: 
  hex  13  dec 
   Dec Integer:  
  setw(5)  setfill('0')  13  endl;

  Moreover a cout  resetiosflags (..)  must be included in debugs
statement to avoid a debugs statement change the look of consequently
debugs.
Of course in the other hand, you have not to check if we have float or
double or integer or long long integer.
Are conversions like the above OK?


4) I was not able to use ios manipulators like hex/dec or endl inside
some files eg wccp2.cc file. The compiler (g++ 4.1.2) always return the
following message:
  wccp2.cc:1455: error: ‘hex’ was not declared in this scope

I try to include iostream and iomanim inside this file but the result
was the same. The strange is that happens only in some of the c++ files
not in all of them.
Any idea?

Regards,
Christos



Re: cvs commit: squid3/src HttpHeader.cc

2007-04-22 Thread Tsantilas Christos
Hi Adrian,
   Looks that we are working the same thing.  All we have limited time
so It is bad two people trying to do the same thing.
If you continue converting debug to debugs and similar code, please
inform me. If you think that I can help you please tell me how  and I
will try. Or I can try help squid3 doing something else

I posted to mailing list what I did since now, with some comments. The
problem with me is that I have not enough time so I am working (and I
will continue working) slowly. Sorry about that

Regards,
Christos

Adrian Chadd wrote:
 adrian  2007/04/21 07:34:42 MDT
...
   Log:
   Convert most of the debug() to debugs()'s; just to see how difficult it is.
   This is in preparation for converting chunks of the Http Header parsing and
   management code to use C++ Strings (eventually..)
 ...



Re: debug statements to debugs statements

2007-04-22 Thread Adrian Chadd
On Sun, Apr 22, 2007, Tsantilas Christos wrote:
 Adrian Chadd wrote:
  
  There's now an implied \n (ie, eol) in the debug path; your patch has
  \n's in there.
  
 
 Oops! I really did not see it (@#$%^[EMAIL PROTECTED]@#)! I will try to 
 remove
 it.. But I think It will take me some years :-( .

Erk!



Adrian



Re: debug statements to debugs statements

2007-04-22 Thread Tsantilas Christos
OK, It takes something less than a year...
The patch at:
 http://www.chtsanti.net/others/CONVER_DEBUGS.diff
does not contains \n any more. I hope that it is OK now

Please try to do not find any such error ... in Sunday... you can find
it on Monday morning  :-) !

Regards,
 Christos

 Adrian Chadd wrote:
 
 There's now an implied \n (ie, eol) in the debug path; your patch has
 \n's in there.

 
 Oops! I really did not see it (@#$%^[EMAIL PROTECTED]@#)! I will try to 
 remove
 it.. But I think It will take me some years :-( .
 
 
 



Re: Debug-Sections for Release

2007-04-22 Thread Adrian Chadd
On Sun, Apr 22, 2007, Amos Jeffries wrote:
 Amos Jeffries wrote:
 This is a cleanup of the published Debug Sections in Squid 3.0.
 
 Source files are only altered in the commented DEBUG: areas. All changes 
 are to better prepare these sections for automatic processing. Some are 
 to bring code sections marked with unknown (ie section ??) up to date 
 by marking with the actual section that is already being used in the code.
 Have also updated the mk-debugs.sh patterns to include more inclusive 
 filepath expansions actually used for locating and sorting these DEBUG: 
 tags.
 
 
 So has anyone with approval ability looked at auditing this for 
 inclusion in HEAD yet?

It superficially looks fine.. bug me on Wednesday if it hasn't been
committed before then.



Adrian