diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2007-08-23 13:17:54 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2007-08-23 13:17:54 +0000 |
commit | 1df55bd1f9cf6ec7f638303652c1d36e92f14cc6 (patch) | |
tree | 7e809eb66fd91e30a4238161da63005ab193e136 /usr.bin | |
parent | 0465788d7ed4c44012f499f1e61560b0ff1fb3e1 (diff) |
support ArgumentX - unbreaks more gnu cvs client things.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/server.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index 1b355678220..d603dbdac40 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.65 2007/07/03 13:22:43 joris Exp $ */ +/* $OpenBSD: server.c,v 1.66 2007/08/23 13:17:53 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -448,6 +448,18 @@ cvs_server_argument(char *data) void cvs_server_argumentx(char *data) { + int idx; + size_t len; + + if (server_argc < 0) + fatal("Protocol Error: ArgumentX without previous argument"); + + idx = server_argc - 1; + + len = strlen(server_argv[idx]) + strlen(data) + 2; + server_argv[idx] = xrealloc(server_argv[idx], len, sizeof(char)); + strlcat(server_argv[idx], "\n", len); + strlcat(server_argv[idx], data, len); } void |