On Fri, 6 Aug 2010 12:05:01 +0200 (CEST) "Imposit.com - webmaster" <webmas...@imposit.com> wrote:
> > > > Not urgent for me. Since i know the problem i added a script to > > delete the stats if a user gets deleted. > > > hmm i dont knwo really the code but why not simply check at first if > > uid exist if not uid +1 and try it again, this should loop uid +1 > > until end. > > > but you need a highers uid in the system for that or it loops to > > nowheres land :-) > > > > > It is not that simple. You miss to see the big picture. Not everyone > > is using a non-virtual setup... > > i know, i mean only if its non virtual of course. > im am right its at : > > if (s->dbt == NULL) > { > LOGDEBUG ("_ds_get_nextuser: invalid database handle (NULL)"); > return NULL; > } > That is such a case. The return NULL is okay but I must introduce another return value to tell others calling the function that the user is unknown (aka NULL) but that there are still other users to check. Maybe I will add to hash and sqlite the iter_user variable and set that to NULL if there are no more users (like it is currently done in mysql/postgresql). The biggest problem is then that the code needs as well to handle storage backend issues. For example in MySQL and/or PostgreSQL relaying only on iter_user to be NULL if there are no users would result in a endless loop if the database handle is invalid (as shown above). So returning there just a NULL would not be enough. In such error cases the iter_user would need to be set to NULL as well (even if there are other users to be returend but a invalid database handle is equal to not being able to query the backend and this is anyway a "no go"). > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Dspam-devel mailing list > Dspam-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/dspam-devel > ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Dspam-devel mailing list Dspam-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspam-devel