On 08.11.05 17:36 +0100, Jonathan De Graeve wrote:
> Does anyone knows why there's $clientip instead of $cpdb[$i][2] in
> this piece of code?
>
> /* find an existing entry and delete it */
> for ($i = 0; $i < count($cpdb); $i++) {
> if(!strcasecmp($cpdb[$i][2],$clientip)) {
>
> ...
> $clientip, <=== Why do we use the new ip instead of the previous one
> recorded in the database. IMHO this breaks the radius accounting
> since the stop will be with the new ip instead of the recorded ip.
strcasecmp() only returns 0 if the two strings are equal, so it
doesn't matter whether we use $cpdb[$i][2] or $clientip.
- Manuel |