On Fri, 6 Aug 2010 12:29:06 +0200 (CEST)
"Imposit.com - webmaster" <webmas...@imposit.com> wrote:

> 
> > 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").
> 
> ok
> 
> in which cases ds_get_nextuser is used anyway?
> is it only for dspam_stats / and admin list users or something else?
> 
It is used in more cases then just that:
theia dspam # find . -type f -name "*.c" -exec grep "_ds_get_nextuser" "{}" 
";"|wc -l
31
theia dspam #



> ------------------------------------------------------------------------------
> 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

Reply via email to