Automatic report from sources (radiusd) between 10.05.2006 - 11.05.2006 GMT

Frank Cusack fcusack at fcusack.com
Thu May 11 20:49:37 CEST 2006


On May 11, 2006 12:57:33 PM -0400 Alan DeKok <aland at nitros9.org> wrote:

> "Automatic cvs log generator" wrote:
>> 	fix compiler warnings (and one typo)
>> Modified files:
> ...
>> 	File: radiusd/src/lib/rbtree.c; Revision: 1.20;
>
>   That wasn't a typo,

The "typo" that wasn't a typo was in valuepair.c.  It's shitty CVS
that makes that part of the log message appear to go with rbtree.c.
See valuepair.c#1.108 for the correction of the "correction".

> and the "const" should really be there.  The
> trees are used in a multi-threaded environment, and the default
> red-black tree code assumes that the sentinel is writable.  It's not.
>
>   After I added the "const", I caught and fixed odd threading bugs,
> where two threads would compete in their writes to the sentinel, which
> would result in problems.

I removed the const because the compiler complains about Sentinel being
self-referential (.Left is not const but you are assigning it a const).

It seemed easier than casting each NIL to (rbnode_t *).

How would you write to the sentinel if it's const?  Or do you mean that
threads would write to it when they shouldn't.

-frank



More information about the Freeradius-Devel mailing list