diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-06-10 21:32:09 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-06-10 21:32:09 +0000 |
commit | 889001f33ade515982f6683a5597616b68f115df (patch) | |
tree | 0b2bcdbf5c8ab7336809435fdf01b77ce138b345 /usr.bin/cvs/proto.c | |
parent | 6cf5ce599fdfc2a470a70283e615864d3d405d2a (diff) |
if the remote end doesn't support a version request,
send noop instead.
Diffstat (limited to 'usr.bin/cvs/proto.c')
-rw-r--r-- | usr.bin/cvs/proto.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c index 976f66d9b81..c461a791401 100644 --- a/usr.bin/cvs/proto.c +++ b/usr.bin/cvs/proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proto.c,v 1.56 2005/05/31 08:58:48 xsa Exp $ */ +/* $OpenBSD: proto.c,v 1.57 2005/06/10 21:32:08 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -684,9 +684,15 @@ cvs_sendreq(struct cvsroot *root, u_int rid, const char *arg) /* is this request supported by the server? */ if (!CVS_GETVR(root, req->req_id)) { - cvs_log(LP_WARN, "remote end does not support request `%s'", - req->req_str); - return (-1); + if (rid == CVS_REQ_VERSION) { + ret = cvs_sendreq(root, CVS_REQ_NOOP, arg); + } else { + cvs_log(LP_WARN, + "remote end does not support request `%s'", + req->req_str); + ret = -1; + } + return (ret); } l = snprintf(cvs_proto_buf, sizeof(cvs_proto_buf), "%s%s%s\n", |