Re: squid3-largeobj squid3/src HttpHdrRange.cc...
On tis, 2007-07-31 at 21:09 +, chtsanti wrote: > - Some convertions of variables to 64bit integers, for which I am not > sure if really needed but they used to hold results of 64bit > operations and I think it is not safe to downgrade 64bit integers ... Please avoid casting unless needed. The compiler automatically promotes to larger types when needed, and will tell you if you try to do the reverse.. So stop casting things to (int64_t). The exception is the upshifts if the value shifted may be large. But I think these should be changed to store bytes to begin with avoiding the problem. It's really more of a theoretical configuration limitation than a real limitation. It's very unlikely anyone would want to configure readahead_gap or quick_abort_min/max as large as 2 GB or more.. So make Config.readAheadGap and Config.quickAbort.min/max b_size_t instead of kb_size_t, and stop upshifting it to compare... Maybe even should be a b_int64_t. Probably we should even kill the kb_size_t type entirely, converting them all to b_int64_t. Focus on killing casts when not absolutely needed. Casts makes it nearly impossible to find problems using automated methods.. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: squid-2 acl fileext
On tis, 2007-07-31 at 17:51 -0300, Lucas Brasilino wrote: > Hi Henrik: > > Did you see my patch? Kind of.. was on vacation and saw the message in my phone and made a mental note to read it in full when home. Then lost in the noise.. > I've sent directly to you to not polute the mailing list with > messy patches... :) :-P Posting to the mailinglist is better. Less things gets lost there, and others may be available to comment. Anyway the problem is here: + k = aclMatchFileExt(&ae->data, esc_buf); which sends a pointer to the pointer, but aclMatchFileExt expects a pointer.. Either remove that &, or make aclMatchFileExt reference the pointer.. wordlist **p = data; wordlist *l = *p; The reason why dstdomain sends a pointer to the pointer is that it's using a splay tree, and the splay trees are self-organising rewriting themselves to optimize matches.. So when to send a pointer to the pointer to the match function depends on the implementation of the match function. Most just wants a plain pointer, only the splay based lookups wants a pointer to the pointer.. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: squid-2 acl fileext
Hi Henrik: Did you see my patch? I've sent directly to you to not polute the mailing list with messy patches... :) :-P regards Lucas Brasilino 2007/7/31, Henrik Nordstrom <[EMAIL PROTECTED]>: > On tis, 2007-07-31 at 12:26 +0200, Emilio Casbas wrote: > > > To get started i'd recommend cloning dstdomain, and then modify the > > > match part to look at the urlpath instead of the requested hostname. > > > Then fine tune this to also deal with query URLs. > > > > Would be the same procedure applied to the urllist acl creation? > > Yes. > > > or do we need a new approach with a external database storing the url > > list like in squidGuard?. > > No, for that we have the external acl interface. > > Regards > Henrik > >
Re: docs squid3/src/ICAP ICAPInitiate.h,1.2,1.2.10.1
On Tue, 2007-07-31 at 20:03 +0200, Henrik Nordstrom wrote: > On tis, 2007-07-31 at 08:03 -0600, Alex Rousskov wrote: > > > > ! AsyncCallWrapper(93,3, ICAPInitiate, noteInitiatorAborted) > > > /**DOCS_NOSEMI*/ > > > Are there any alternative options to make doxygen happier without > > modifying the sources? Perhaps we can add a simple preprocessing script > > that would add the above crap before starting doxygen? > > It's possible to teach Doxygen about these "odd" defines, allowing it to > parse the code reasonably. > > http://www.stack.nl/~dimitri/doxygen/preprocessing.html Great! > But I suppose it should also be possible to refactor many of these using > C++ templating, avoiding the need for defines in the first place.. I agree that many (most?) #defines should be eliminated in favor of inline functions, constants, and perhaps even an occasional template or two. The #defines related to asynchronous messages will be gone when the messaging/event support is improved. They are a necessary evil until then. Alex.
Re: docs squid3/src/ICAP ICAPInitiate.h,1.2,1.2.10.1
On tis, 2007-07-31 at 08:03 -0600, Alex Rousskov wrote: > > ! AsyncCallWrapper(93,3, ICAPInitiate, noteInitiatorAborted) > > /**DOCS_NOSEMI*/ > Are there any alternative options to make doxygen happier without > modifying the sources? Perhaps we can add a simple preprocessing script > that would add the above crap before starting doxygen? It's possible to teach Doxygen about these "odd" defines, allowing it to parse the code reasonably. http://www.stack.nl/~dimitri/doxygen/preprocessing.html But I suppose it should also be possible to refactor many of these using C++ templating, avoiding the need for defines in the first place.. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: docs squid3/src/ICAP ICAPInitiate.h,1.2,1.2.10.1
On Tue, 2007-07-31 at 04:29 +, Amos Jeffries wrote: > Update of cvs.devel.squid-cache.org:/cvsroot/squid/squid3/src/ICAP > > Modified Files: > Tag: docs > ICAPInitiate.h > Log Message: > Make doxygen happier with the source. > > > Index: ICAPInitiate.h > === > RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPInitiate.h,v > retrieving revision 1.2 > retrieving revision 1.2.10.1 > diff -C2 -d -r1.2 -r1.2.10.1 > *** ICAPInitiate.h8 May 2007 16:51:27 - 1.2 > --- ICAPInitiate.h31 Jul 2007 04:29:06 - 1.2.10.1 > *** > *** 87,91 > // communication with the initiator > virtual void noteInitiatorAborted() = 0; > ! AsyncCallWrapper(93,3, ICAPInitiate, noteInitiatorAborted) > > protected: > --- 87,91 > // communication with the initiator > virtual void noteInitiatorAborted() = 0; > ! AsyncCallWrapper(93,3, ICAPInitiate, noteInitiatorAborted) > /**DOCS_NOSEMI*/ > > protected: Are there any alternative options to make doxygen happier without modifying the sources? Perhaps we can add a simple preprocessing script that would add the above crap before starting doxygen? Thank you, Alex.
Re: squid-2 acl fileext
On tis, 2007-07-31 at 12:26 +0200, Emilio Casbas wrote: > > To get started i'd recommend cloning dstdomain, and then modify the > > match part to look at the urlpath instead of the requested hostname. > > Then fine tune this to also deal with query URLs. > > Would be the same procedure applied to the urllist acl creation? Yes. > or do we need a new approach with a external database storing the url > list like in squidGuard?. No, for that we have the external acl interface. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: squid-2 acl fileext
Henrik Nordstrom escribió: To get started i'd recommend cloning dstdomain, and then modify the match part to look at the urlpath instead of the requested hostname. Then fine tune this to also deal with query URLs. Would be the same procedure applied to the urllist acl creation? or do we need a new approach with a external database storing the url list like in squidGuard?. Thanks Emilio C.