summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/cvs/client.c7
-rw-r--r--usr.bin/cvs/cvs.h4
-rw-r--r--usr.bin/cvs/root.c6
3 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index c93d95bbadc..0902ef60bc0 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.77 2007/09/07 19:36:05 tobias Exp $ */
+/* $OpenBSD: client.c,v 1.78 2007/09/10 14:06:14 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -234,6 +234,11 @@ cvs_client_connect_to_server(void)
argv[argc++] = current_cvsroot->cr_user;
}
+ if (current_cvsroot->cr_port != NULL) {
+ argv[argc++] = "-p";
+ argv[argc++] = current_cvsroot->cr_port;
+ }
+
argv[argc++] = current_cvsroot->cr_host;
argv[argc++] = cmd;
argv[argc++] = "server";
diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h
index 8c6d7d6742f..693ace54f6a 100644
--- a/usr.bin/cvs/cvs.h
+++ b/usr.bin/cvs/cvs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.h,v 1.143 2007/09/04 19:07:03 tobias Exp $ */
+/* $OpenBSD: cvs.h,v 1.144 2007/09/10 14:06:14 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -208,7 +208,7 @@ struct cvsroot {
char *cr_pass;
char *cr_host;
char *cr_dir;
- u_int cr_port;
+ char *cr_port;
/* connection data */
u_int cr_flags;
diff --git a/usr.bin/cvs/root.c b/usr.bin/cvs/root.c
index b7e49870709..9ca716e0596 100644
--- a/usr.bin/cvs/root.c
+++ b/usr.bin/cvs/root.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: root.c,v 1.41 2007/09/02 12:13:00 tobias Exp $ */
+/* $OpenBSD: root.c,v 1.42 2007/09/10 14:06:14 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -133,10 +133,12 @@ cvsroot_parse(const char *str)
pp = strchr(sp, ':');
if (pp != NULL) {
*(pp++) = '\0';
- root->cr_port = strtonum(pp, 1, 65535, &errstr);
+
+ i = strtonum(pp, 1, 65535, &errstr);
if (errstr != NULL)
fatal("port specification in CVSROOT is %s", errstr);
+ root->cr_port = pp;
}
root->cr_host = sp;