[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 214 - trunk/subversion/include trunk/subversion/libsvn_ra_local trunk/subversion/libsvn_client trunk/subversion/libsvn_ra_dav

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-10-08 17:11:57 CEST

On Mon, Oct 08, 2001 at 09:37:26AM -0500, sussman@tigris.org wrote:
>...
> --- OLD/trunk/subversion/libsvn_ra_dav/session.c Mon Oct 8 09:37:26 2001
> +++ NEW/trunk/subversion/libsvn_ra_dav/session.c Mon Oct 8 09:37:26 2001
> @@ -56,21 +56,26 @@
> svn_ra_simple_password_authenticator_t *authenticator = NULL;
> svn_ra_session_t *ras = userdata;
>
> + /* if set, then this is at least the 2nd time neon has called this
> + callback, meaning that previous authentication failed. */
> + static int retry = 0;

-1

Static variables like this completely kill any kind of threadedness,
reentrancy, and make usage of a library non-intuitive. ("last time I created
an RA session, skipped the prompt; why not now?")

Put this value into svn_ra_session_t, initialized each time one is created.

>...
> + authenticator->get_user_and_pass (&uname, &pword,
> + auth_baton,
> + retry, /* possibly tell this
> + function to force a
> + prompt */

The parameter is an svn_boolean_t, not an integer. This should be retry>0.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:44 2006

This is an archived mail posted to the Subversion Dev mailing list.