diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-05-24 06:42:39 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-05-24 06:42:39 +0000 |
commit | a2768d5c5da58867f290009a65da6648d55816f2 (patch) | |
tree | 3252f392ea2695e9b686065f2aad6684cc8e4c41 | |
parent | e39b4c0486fb4d21ad5c380bd3c29579aad613c3 (diff) |
as a client, the the Root response first, before trying to ask the version
from our server. This will prevent our server from screwing up in
cvs_startcmd().
ok jfb@
-rw-r--r-- | usr.bin/cvs/proto.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c index c30e93bfd90..1418ec6d373 100644 --- a/usr.bin/cvs/proto.c +++ b/usr.bin/cvs/proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proto.c,v 1.53 2005/05/24 04:01:03 jfb Exp $ */ +/* $OpenBSD: proto.c,v 1.54 2005/05/24 06:42:38 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -308,6 +308,11 @@ cvs_connect(struct cvsroot *root) return (-1); } + /* send the CVSROOT to the server unless it's an init */ + if ((cvs_cmdop != CVS_OP_INIT) && + (cvs_sendreq(root, CVS_REQ_ROOT, root->cr_dir) < 0)) + return (-1); + /* don't fail if this request doesn't work */ if (cvs_sendreq(root, CVS_REQ_VERSION, NULL) < 0) cvs_log(LP_WARN, "failed to get remote version"); @@ -329,11 +334,6 @@ cvs_connect(struct cvsroot *root) if (cvs_trace && (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-t") < 0)) return (-1); - /* now send the CVSROOT to the server unless it's an init */ - if ((cvs_cmdop != CVS_OP_INIT) && - (cvs_sendreq(root, CVS_REQ_ROOT, root->cr_dir) < 0)) - return (-1); - /* not sure why, but we have to send this */ if (cvs_sendreq(root, CVS_REQ_USEUNCHANGED, NULL) < 0) return (-1); |