]> git.pld-linux.org Git - packages/cvs-nserver.git/blame - cvs-nserver-CAN-2004-0396.patch
Release 36 (by relup.sh)
[packages/cvs-nserver.git] / cvs-nserver-CAN-2004-0396.patch
CommitLineData
1e29e54b
AM
1diff -urN cvs-nserver-1.11.1.52.org/src/server.c cvs-nserver-1.11.1.52/src/server.c
2--- cvs-nserver-1.11.1.52.org/src/server.c 2004-05-23 02:51:33.266858272 +0200
3+++ cvs-nserver-1.11.1.52/src/server.c 2004-05-23 03:20:21.869070792 +0200
4@@ -1635,8 +1635,18 @@
5 && strncmp (arg, name, cp - name) == 0)
6 {
7 timefield = strchr (cp + 1, '/') + 1;
8- if (*timefield != '=')
9+ /* If the time field is not currently empty, then one of
10+ * serve_modified, serve_is_modified, & serve_unchanged were
11+ * already called for this file. We would like to ignore the
12+ * reinvocation silently or, better yet, exit with an error
13+ * message, but we just avoid the copy-forward and overwrite the
14+ * value from the last invocation instead. See the comment below
15+ * for more.
16+ */
17+ if (*timefield == '/')
18 {
19+ /* Copy forward one character. Space was allocated for this
20+ * already in serve_entry(). */
21 cp = timefield + strlen (timefield);
22 cp[1] = '\0';
23 while (cp > timefield)
24@@ -1644,8 +1654,17 @@
25 *cp = cp[-1];
26 --cp;
27 }
28- *timefield = '=';
29 }
30+ /* If *TIMEFIELD wasn't "/", we assume that it was because of
31+ * multiple calls to Is-Modified & Unchanged by the client and
32+ * just overwrite the value from the last call. Technically, we
33+ * should probably either ignore calls after the first or send the
34+ * client an error, since the client/server protocol specification
35+ * specifies that only one call to either Is-Modified or Unchanged
36+ * is allowed, but broken versions of WinCVS & TortoiseCVS rely on
37+ * this behavior.
38+ */
39+ *timefield = '=';
40 break;
41 }
42 }
43@@ -1679,8 +1698,18 @@
44 && strncmp (arg, name, cp - name) == 0)
45 {
46 timefield = strchr (cp + 1, '/') + 1;
47- if (!(timefield[0] == 'M' && timefield[1] == '/'))
48+ /* If the time field is not currently empty, then one of
49+ * serve_modified, serve_is_modified, & serve_unchanged were
50+ * already called for this file. We would like to ignore the
51+ * reinvocation silently or, better yet, exit with an error
52+ * message, but we just avoid the copy-forward and overwrite the
53+ * value from the last invocation instead. See the comment below
54+ * for more.
55+ */
56+ if (*timefield == '/')
57 {
58+ /* Copy forward one character. Space was allocated for this
59+ * already in serve_entry(). */
60 cp = timefield + strlen (timefield);
61 cp[1] = '\0';
62 while (cp > timefield)
63@@ -1688,8 +1717,17 @@
64 *cp = cp[-1];
65 --cp;
66 }
67- *timefield = 'M';
68 }
69+ /* If *TIMEFIELD wasn't "/", we assume that it was because of
70+ * multiple calls to Is-Modified & Unchanged by the client and
71+ * just overwrite the value from the last call. Technically, we
72+ * should probably either ignore calls after the first or send the
73+ * client an error, since the client/server protocol specification
74+ * specifies that only one call to either Is-Modified or Unchanged
75+ * is allowed, but broken versions of WinCVS & TortoiseCVS rely on
76+ * this behavior.
77+ */
78+ *timefield = 'M';
79 if (kopt != NULL)
80 {
81 if (alloc_pending (strlen (name) + 80))
This page took 0.08477 seconds and 4 git commands to generate.