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

Re: svn commit: r18672 - trunk/subversion/libsvn_ra_serf

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-03-02 07:58:44 CET

This code would be much more comprehensible if the "conn" fields
include a prefix to differentiate between their types (e.g. "ra_conn"
and "serf_conn", so all those "ctx->conn->conn" statements become
"ctx->ra_conn->serf_conn").

I'm generally a hater of Hungarian notation, but given the large
number of various connection arrays and variables and fields floating
around in this code, a little prefixing could really improve the
readability.

- Dan

On Wed, 01 Mar 2006, jerenkrantz@tigris.org wrote:
...
> --- trunk/subversion/libsvn_ra_serf/blame.c (original)
> +++ trunk/subversion/libsvn_ra_serf/blame.c Wed Mar 1 20:55:42 2006
...
> @@ -561,10 +562,12 @@
> blame_ctx->session = session;
> blame_ctx->buckets = buckets;
> blame_ctx->path = req_url;
> + blame_ctx->conn = session->conns[0];
> blame_ctx->acceptor = accept_response;
> blame_ctx->handler = handle_blame;
>
> - serf_connection_request_create(session->conns[0], setup_blame, blame_ctx);
> + serf_connection_request_create(blame_ctx->conn->conn, setup_blame,
> + blame_ctx);
...
> --- trunk/subversion/libsvn_ra_serf/ra_serf.h (original)
> +++ trunk/subversion/libsvn_ra_serf/ra_serf.h Wed Mar 1 20:55:42 2006
> @@ -32,6 +32,27 @@
> #include "svn_dav.h"
>
>
> +/* A serf connection and optionally associated SSL context. */
> +typedef struct {
> + /* Our connection to a server. */
> + serf_connection_t *conn;
> +
> + /* Bucket allocator for this connection. */
> + serf_bucket_alloc_t *bkt_alloc;
> +
> + /* Host name */
> + const char *hostinfo;
> +
> + /* The address where the connections are made to */
> + apr_sockaddr_t *address;
> +
> + /* Are we using ssl */
> + svn_boolean_t using_ssl;
> +
> + /* Optional SSL context for this connection. */
> + serf_ssl_context_t *ssl_context;
> +} ra_serf_connection_t;
> +
> /*
> * The master serf RA session.
> *

  • application/pgp-signature attachment: stored
Received on Thu Mar 2 08:00:07 2006

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.