Hi All,
I hereby attach patch for #1942.
Ran make check/make autodavcheck found nothing alarming.
Ran make svnsshcheck found 16 tests failing with and without this patch
and hence attribute the failures to out of date work area and submit
this patch.
With regards
Kamesh Jayachandran
[[[
Fix issue #1942, svn+ssh should use the port value
Patch by: Kamesh Jayachandran <kamesh@collab.net>
* subversion/libsvn_ra_svn/client.c
(find_tunnel_agent) Modified to accept the apr_uri_t*
rather than hostinfo so that we can make use of the
port information available in apr_uri_t.
This port is given as -p to ssh binary in case available.
]]]
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c (revision 18117)
+++ subversion/libsvn_ra_svn/client.c (working copy)
@@ -438,7 +438,7 @@
/* --- RA LAYER IMPLEMENTATION --- */
static svn_error_t *find_tunnel_agent(const char *tunnel,
- const char *hostinfo,
+ const apr_uri_t *uri,
const char ***argv,
apr_hash_t *config, apr_pool_t *pool)
{
@@ -493,9 +493,21 @@
/* Append the fixed arguments to the result. */
for (n = 0; cmd_argv[n] != NULL; n++)
;
- *argv = apr_palloc(pool, (n + 4) * sizeof(char *));
+ if (uri->port_str != NULL)
+ {
+ *argv = apr_palloc(pool, (n + 6) * sizeof(char *));
+ }
+ else
+ {
+ *argv = apr_palloc(pool, (n + 4) * sizeof(char *));
+ }
memcpy(*argv, cmd_argv, n * sizeof(char *));
- (*argv)[n++] = svn_path_uri_decode (hostinfo, pool);
+ if (uri->port_str != NULL)
+ {
+ (*argv)[n++] = "-p";
+ (*argv)[n++] = uri->port_str;
+ }
+ (*argv)[n++] = svn_path_uri_decode (uri->hostname, pool);
(*argv)[n++] = "svnserve";
(*argv)[n++] = "-t";
(*argv)[n] = NULL;
@@ -717,8 +729,7 @@
parse_tunnel (url, &tunnel, pool);
if (tunnel)
- SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config,
- pool));
+ SVN_ERR(find_tunnel_agent(tunnel, &uri, &tunnel_argv, config, pool));
else
tunnel_argv = NULL;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 1 10:57:53 2006