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

Re: [PATCH] Fix for Issue 1267

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-07-18 18:15:06 CEST

Shlomi Fish <shlomif@vipe.stud.technion.ac.il> writes:

> Hmmm... there was an indentation misbehaviour in the previous patch, so
> here's a corrected one. Enjoy!

The patch is also reversed, something that would not happen if you
used 'svn diff'.

It's eaiser to keep track of things if you send the log message every
time you send the patch

> --- subversion/subversion/libsvn_ra_dav/session.c 2003-07-18 02:32:57.000000000 +0300
> +++ subversion/subversion/libsvn_ra_dav/session.c.orig 2003-07-18 02:05:59.000000000 +0300
> @@ -108,12 +108,6 @@
> return 0;
> }
>
> -typedef struct
> -{
> - svn_ra_session_t * ras;
> - svn_ra_ne_session_baton_t * ne_sess_baton;

Minor whitespace nit, most of the Subversion code uses

     svn_ra_session_t *ras;
     svn_ra_ne_session_baton_t *ne_sess_baton;

> -} server_ssl_callback_baton_t;
> -
>
> /* A neon-session callback to validate the SSL certificate when the CA
> is unknown or there are other SSL certificate problems. */
> @@ -122,8 +116,7 @@
> int failures,
> const ne_ssl_certificate *cert)
> {
> - server_ssl_callback_baton_t *baton = userdata;
> - svn_ra_session_t *ras = baton->ras;
> + svn_ra_session_t *ras = userdata;
> void *creds;
> svn_auth_cred_server_ssl_t *server_creds;
> svn_auth_iterstate_t *state;
> @@ -131,7 +124,6 @@
> svn_error_t *error;
> int failures_allowed = 0;
>
> - baton->ne_sess_baton->was_ssl_certificate_verified = TRUE;
> svn_auth_set_parameter(ras->callbacks->auth_baton,
> SVN_AUTH_PARAM_SSL_SERVER_FAILURES_IN,
> (void*)failures);
> @@ -152,15 +144,7 @@
> failures_allowed = (server_creds) ? server_creds->failures_allow : 0;
> }
> apr_pool_destroy(pool);
> - {
> - int ret = (failures & ~failures_allowed);
> - if (ret)
> - {
> - baton->ne_sess_baton->was_ssl_certificate_rejected = TRUE;
> - }
> - return ret;
> - }
> -
> + return (failures & ~failures_allowed);
> }
>
> static int
> @@ -448,7 +432,6 @@
> svn_boolean_t compression;
> svn_config_t *cfg;
> const char *server_group;
> - server_ssl_callback_baton_t *ssl_baton;
>
> /* Sanity check the URI */
> if (ne_uri_parse(repos_URL, &uri)
> @@ -612,15 +595,12 @@
>
> /* Setup and register the private session data on the Neon
> sessions. */
> - ssl_baton = apr_palloc(pool, sizeof(*ssl_baton));
> - ssl_baton->ras = ras;
> {
> svn_ra_ne_session_baton_t *bt;
> bt = apr_palloc(pool, sizeof(*bt));

I don't know much about the neon-Subversion interface, but this looks
a little odd to me. Why are two separate batons allocated (ssl_baton
and bt) one of which contains a pointer to the other? Should they be
combined?

> bt->compression = compression;
> ne_set_session_private(sess, SVN_RA_NE_SESSION_ID, bt);
> ne_set_session_private(sess2, SVN_RA_NE_SESSION_ID, bt);
> - ssl_baton->ne_sess_baton = bt;
> }
>
> if (is_ssl_session)

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 18 18:16:18 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.