From 1124f9512c12c95519a730c29ad801dc4be66469 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Thu, 11 Jan 2007 02:35:56 +0000 Subject: in a remote setup: do not connect to the remote server until we are sure all the options passed to the commands are valid. noticed by xsa@ --- usr.bin/cvs/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs/init.c') diff --git a/usr.bin/cvs/init.c b/usr.bin/cvs/init.c index d3747d425ec..a42f4e46947 100644 --- a/usr.bin/cvs/init.c +++ b/usr.bin/cvs/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.26 2006/11/09 14:00:14 xsa Exp $ */ +/* $OpenBSD: init.c,v 1.27 2007/01/11 02:35:55 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2006 Xavier Santolaria @@ -82,6 +82,7 @@ cvs_init(int argc, char **argv) fatal("init does not take any extra arguments"); if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { + cvs_client_connect_to_server(); cvs_client_send_request("init %s", current_cvsroot->cr_dir); cvs_client_get_responses(); } else -- cgit v1.2.3