Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73a649b
)
Used a couple "#if SUBPROTOCOL_VERSION != 0" conditionals.
author
Wayne Davison
<wayned@samba.org>
Sun, 9 Sep 2007 07:52:59 +0000
(07:52 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sun, 9 Sep 2007 07:52:59 +0000
(07:52 +0000)
compat.c
patch
|
blob
|
blame
|
history
diff --git
a/compat.c
b/compat.c
index
aa32de8
..
fb00274
100644
(file)
--- a/
compat.c
+++ b/
compat.c
@@
-67,13
+67,19
@@
static void check_sub_protocol(void)
{
char *dot;
int their_protocol, their_sub;
{
char *dot;
int their_protocol, their_sub;
+#if SUBPROTOCOL_VERSION != 0
int our_sub = protocol_version < PROTOCOL_VERSION ? 0 : SUBPROTOCOL_VERSION;
int our_sub = protocol_version < PROTOCOL_VERSION ? 0 : SUBPROTOCOL_VERSION;
+#else
+ int our_sub = 0;
+#endif
if (!shell_cmd || !(dot = strchr(shell_cmd, '.'))
|| !(their_protocol = atoi(shell_cmd))
|| !(their_sub = atoi(dot+1))) {
if (!shell_cmd || !(dot = strchr(shell_cmd, '.'))
|| !(their_protocol = atoi(shell_cmd))
|| !(their_sub = atoi(dot+1))) {
+#if SUBPROTOCOL_VERSION != 0
if (our_sub)
protocol_version--;
if (our_sub)
protocol_version--;
+#endif
return;
}
return;
}
@@
-84,7
+90,7
@@
static void check_sub_protocol(void)
}
if (their_protocol > protocol_version)
}
if (their_protocol > protocol_version)
- their_sub = 0; /* 0 == final version */
+ their_sub = 0; /* 0 == final version
of older protocol
*/
if (their_sub != our_sub)
protocol_version--;
}
if (their_sub != our_sub)
protocol_version--;
}