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

Cancellable auth prompts

From: Tor Hovland <tor_at_nidaros.homedns.org>
Date: 2003-06-06 22:32:42 CEST

I use the simple prompt provider in a GUI client. However, there seems to be
no real way for the user to cancel the authentication dialog (i.e. the
prompt_func), thereby cancelling the operation that is about to run as well.

I have tried doing

return svn_error_create(SVN_ERR_CANCELLED, NULL, "Authentication prompt
cancelled by user.");

but instead of catching this error, it gets propagated all the way up to
neon, upon which the pending operation fails instead of just stopping.

My immediate guess was that the problem could be rectified in get_creds(),
by checking explicitly for SVN_ERR_CANCELLED and keeping got_creds == 0
before returning, but it might not be quite that easy, as
svn_auth_first_credentials() will then just keep looking for another
provider that is able to succeed.

A better approach would probably be to handle the error in request_auth(),
but then the next question is whether it is possible to return a meaningful
cancellation signal to neon. It seems that it isn't. Neon will return
NE_AUTH regardless of how authentication is interrupted.

So now I'm stuck. I'm thinking that others must have been wondering about
this before, and the Subversion API suffers because of lacking cancellation
support in Neon. Or am I missing something?

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 6 22:27:47 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.