summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2006-12-19 16:04:40 +0000
committerxsa <xsa@openbsd.org>2006-12-19 16:04:40 +0000
commita341aa380ad3b4307f91f5f5bbb4ffe1ff9c7934 (patch)
tree762eef76ccb28bfbc9034a7371a12b603320ecdf
parentcorrectly check snprintf(), noticed by ray@ (diff)
downloadwireguard-openbsd-a341aa380ad3b4307f91f5f5bbb4ffe1ff9c7934.tar.xz
wireguard-openbsd-a341aa380ad3b4307f91f5f5bbb4ffe1ff9c7934.zip
add some bits to handle Remove-entry.
-rw-r--r--usr.bin/cvs/client.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index 847ac750544..2e96fd2b473 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.37 2006/12/19 15:12:59 joris Exp $ */
+/* $OpenBSD: client.c,v 1.38 2006/12/19 16:04:40 xsa Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -738,10 +738,26 @@ cvs_client_removed(char *data)
void
cvs_client_remove_entry(char *data)
{
- char *dir;
+ CVSENTRIES *entlist;
+ struct cvs_ent *ent;
+ char *dir, *entry;
dir = cvs_remote_input();
+ entry = cvs_remote_input();
xfree(dir);
+
+ cvs_log(LP_TRACE, "cvs_client_remove_entry(%s)", entry);
+
+ if ((ent = cvs_ent_parse(entry)) == NULL)
+ fatal("cvs_client_remove_entry: cvs_ent_parse failed");
+
+ entlist = cvs_ent_open(data);
+
+ cvs_ent_remove(entlist, ent->ce_name);
+ cvs_ent_free(ent);
+ cvs_ent_close(entlist, ENT_SYNC);
+
+ xfree(entry);
}
void