=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/Attic/proto.c,v retrieving revision 1.39 retrieving revision 1.40 diff -c -r1.39 -r1.40 *** src/usr.bin/cvs/Attic/proto.c 2005/01/14 20:58:43 1.39 --- src/usr.bin/cvs/Attic/proto.c 2005/02/04 18:16:40 1.40 *************** *** 1,4 **** ! /* $OpenBSD: proto.c,v 1.39 2005/01/14 20:58:43 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: proto.c,v 1.40 2005/02/04 18:16:40 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 279,292 **** return (-1); } - #if 0 - root->cr_srverr = fdopen(errfd[0], "r"); - if (root->cr_srverr == NULL) { - cvs_log(LP_ERR, "failed to create pipe stream"); - return (-1); - } - #endif - /* make the streams line-buffered */ (void)setvbuf(root->cr_srvin, NULL, _IOLBF, 0); (void)setvbuf(root->cr_srvout, NULL, _IOLBF, 0); --- 279,284 ---- *************** *** 298,310 **** * requests. */ ! vresp = cvs_resp_getvalid(); ! if (vresp == NULL) { cvs_log(LP_ERR, "can't generate list of valid responses"); return (-1); } if (cvs_sendreq(root, CVS_REQ_VALIDRESP, vresp) < 0) { } free(vresp); --- 290,304 ---- * requests. */ ! if ((vresp = cvs_resp_getvalid()) == NULL) { cvs_log(LP_ERR, "can't generate list of valid responses"); return (-1); } if (cvs_sendreq(root, CVS_REQ_VALIDRESP, vresp) < 0) { + cvs_log(LP_ERR, "failed to get valid responses"); + free(vresp); + return (-1); } free(vresp); *************** *** 313,333 **** return (-1); } if (cvs_sendreq(root, CVS_REQ_VERSION, NULL) < 0) ! cvs_log(LP_ERR, "failed to get remote version"); /* now share our global options with the server */ ! if (verbosity == 1) ! cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-q"); ! else if (verbosity == 0) ! cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-Q"); ! if (cvs_nolog) ! cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-l"); ! if (cvs_readonly) ! cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-r"); ! if (cvs_trace) ! cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-t"); /* now send the CVSROOT to the server unless it's an init */ if ((cvs_cmdop != CVS_OP_INIT) && --- 307,330 ---- 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"); /* now share our global options with the server */ ! if ((verbosity == 1) && ! (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-q") < 0)) ! return (-1); ! else if ((verbosity == 0) && ! (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-Q") < 0)) ! return (-1); ! if (cvs_nolog && (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-l") < 0)) ! return (-1); ! if (cvs_readonly && (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-r") < 0)) ! return (-1); ! 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) && *************** *** 337,346 **** /* not sure why, but we have to send this */ if (cvs_sendreq(root, CVS_REQ_USEUNCHANGED, NULL) < 0) return (-1); - - #ifdef CVS_ZLIB - /* if compression was requested, initialize it */ - #endif cvs_log(LP_DEBUG, "connected to %s", root->cr_host); --- 334,339 ----