[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:58:23 CEST

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

>> 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?
>
> Not really. ssl_baton is for the server_ssl_callback function and itself
> contains two other batons (the ras and the bt). bt is the neon session
> baton, and it does not contain ras. We need them all.

It's the double allocation that looks odd. I suppose I asking why

  struct server_ssl_callback_baton_t
  {
     ...
     svn_ra_ne_session_baton_t *ne_sess_baton;
  }
  ssl_baton = apr_palloc(...);
  bt = apr_palloc(...)
  ssl_baton->ne_sess_baton = bt;

rather than

  struct server_ssl_callback_baton_t
  {
     ...
     svn_ra_ne_session_baton_t ne_sess_baton;
  }
  ssl_baton = apr_palloc(...);
  bt = &ssl_baton->ne_sess_baton;

I don't really object to the way you have done it, I'm just wondering
if it's deliberate. APR's pools provide allocations are cheap so it
suppose it doesn't really matter.

-- 
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:59:23 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.