On Fri, 18 Jul 2003, Philip Martin wrote:
> 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.
>
You can do it either way, I suppose. My way is the first solution that
came to my mind.
Regards,
Shlomi Fish
>
----------------------------------------------------------------------
Shlomi Fish shlomif@vipe.technion.ac.il
Home Page: http://t2.technion.ac.il/~shlomif/
An apple a day will keep a doctor away. Two apples a day will keep two
doctors away.
Falk Fish
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 18 21:18:41 2003