=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/import.c,v retrieving revision 1.13 retrieving revision 1.14 diff -c -r1.13 -r1.14 *** src/usr.bin/cvs/import.c 2005/04/25 16:29:41 1.13 --- src/usr.bin/cvs/import.c 2005/05/20 20:00:53 1.14 *************** *** 1,4 **** ! /* $OpenBSD: import.c,v 1.13 2005/04/25 16:29:41 jfb Exp $ */ /* * Copyright (c) 2004 Joris Vink * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: import.c,v 1.14 2005/05/20 20:00:53 joris Exp $ */ /* * Copyright (c) 2004 Joris Vink * All rights reserved. *************** *** 141,147 **** int cvs_import_file(CVSFILE *cfp, void *arg) { ! int ret, l; struct cvsroot *root; char fpath[MAXPATHLEN], repodir[MAXPATHLEN]; char repo[MAXPATHLEN]; --- 141,147 ---- int cvs_import_file(CVSFILE *cfp, void *arg) { ! int l; struct cvsroot *root; char fpath[MAXPATHLEN], repodir[MAXPATHLEN]; char repo[MAXPATHLEN]; *************** *** 151,157 **** if (l == -1 || l >= (int)sizeof(repo)) { errno = ENAMETOOLONG; cvs_log(LP_ERRNO, "%s", repo); ! return (-1); } cvs_file_getpath(cfp, fpath, sizeof(fpath)); --- 151,157 ---- if (l == -1 || l >= (int)sizeof(repo)) { errno = ENAMETOOLONG; cvs_log(LP_ERRNO, "%s", repo); ! return (CVS_EX_DATA); } cvs_file_getpath(cfp, fpath, sizeof(fpath)); *************** *** 166,178 **** if (l == -1 || l >= (int)sizeof(repodir)) { errno = ENAMETOOLONG; cvs_log(LP_ERRNO, "%s", repodir); ! return (-1); } } if (root->cr_method != CVS_METHOD_LOCAL) { ! ret = cvs_sendreq(root, CVS_REQ_DIRECTORY, fpath); ! if (ret == 0) ! ret = cvs_sendln(root, repodir); } else { /* create the directory */ } --- 166,179 ---- if (l == -1 || l >= (int)sizeof(repodir)) { errno = ENAMETOOLONG; cvs_log(LP_ERRNO, "%s", repodir); ! return (CVS_EX_DATA); } } if (root->cr_method != CVS_METHOD_LOCAL) { ! if (cvs_sendreq(root, CVS_REQ_DIRECTORY, fpath) < 0) ! return (CVS_EX_PROTO); ! if (cvs_sendln(root, repodir) < 0) ! return (CVS_EX_PROTO); } else { /* create the directory */ }