summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDavid Dykstra <dwd@samba.org>1998-11-03 21:17:40 +0000
committerDavid Dykstra <dwd@samba.org>1998-11-03 21:17:40 +0000
commit2acf81eb004292893a86b9e2cfa7f2ab4fcc2fb6 (patch)
tree9f7870d14c0fde148192e696164bce9b5f9c0f3e /main.c
parent654175798bdbdd6403e10c8fa74e8586b3612ea1 (diff)
downloadrsync-2acf81eb004292893a86b9e2cfa7f2ab4fcc2fb6.tar.gz
Add support for optional ":PORT" in rsync URL.
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index bc587ccc..9b377386 100644
--- a/main.c
+++ b/main.c
@@ -464,6 +464,7 @@ static int start_client(int argc, char *argv[])
extern int local_server;
extern int am_sender;
extern char *shell_cmd;
+ extern int rsync_port;
if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0) {
char *host, *path;
@@ -476,6 +477,11 @@ static int start_client(int argc, char *argv[])
} else {
path="";
}
+ p = strchr(host,':');
+ if (p) {
+ rsync_port = atoi(p+1);
+ *p = 0;
+ }
return start_socket_client(host, path, argc-1, argv+1);
}