summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/server.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-01-18 16:45:53 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-01-18 16:45:53 +0000
commit1d2bf3c06fb24ab6e3c6d60346f8d9e6359384fc (patch)
treec63f3694e6fb2b2c77ae81bc879caafcad1316d2 /usr.bin/cvs/server.c
parent836bc0a4c096fe519947f933469838dd10809ec3 (diff)
import improvements:
- add support for remote import in opencvs client and server. - do not free already free'd buffers in import_update() - do not append a '\0' to the loaded file buffer, this was bad behaviour makes import work fine both locally and remotely.
Diffstat (limited to 'usr.bin/cvs/server.c')
-rw-r--r--usr.bin/cvs/server.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index c27ebd77527..70ef3f0a398 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.49 2007/01/17 17:54:50 joris Exp $ */
+/* $OpenBSD: server.c,v 1.50 2007/01/18 16:45:52 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -482,6 +482,17 @@ cvs_server_add(char *data)
}
void
+cvs_server_import(char *data)
+{
+ if (chdir(server_currentdir) == -1)
+ fatal("cvs_server_import: %s", strerror(errno));
+
+ cvs_cmdop = CVS_OP_IMPORT;
+ cvs_import(server_argc, server_argv);
+ cvs_server_send_response("ok");
+}
+
+void
cvs_server_admin(char *data)
{
if (chdir(server_currentdir) == -1)