Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
bc63ae3f
Commit
bc63ae3f
authored
Mar 31, 2003
by
J.W. Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing vestigial support for protocol versions prior to 15.
parent
6e128863
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
56 deletions
+32
-56
checksum.c
checksum.c
+0
-10
compat.c
compat.c
+6
-10
flist.c
flist.c
+2
-2
generator.c
generator.c
+10
-13
match.c
match.c
+5
-9
receiver.c
receiver.c
+8
-10
sender.c
sender.c
+1
-2
No files found.
checksum.c
View file @
bc63ae3f
...
...
@@ -117,16 +117,6 @@ void file_checksum(char *fname,char *sum,OFF_T size)
}
void
checksum_init
(
void
)
{
if
(
remote_version
>=
14
)
csum_length
=
2
;
/* adaptive */
else
csum_length
=
SUM_LENGTH
;
}
static
int
sumresidue
;
static
char
sumrbuf
[
CSUM_CHUNK
];
static
struct
mdfour
md
;
...
...
compat.c
View file @
bc63ae3f
...
...
@@ -65,18 +65,14 @@ void setup_protocol(int f_out,int f_in)
rprintf
(
FINFO
,
"%s is very old version of rsync, upgrade recommended.
\n
"
,
am_server
?
"Server"
:
"Client"
);
if
(
remote_version
>=
12
)
{
if
(
am_server
)
{
if
(
read_batch
||
write_batch
)
/* dw */
if
(
am_server
)
{
if
(
read_batch
||
write_batch
)
/* dw */
checksum_seed
=
32761
;
else
else
checksum_seed
=
time
(
NULL
);
write_int
(
f_out
,
checksum_seed
);
}
else
{
checksum_seed
=
read_int
(
f_in
);
}
write_int
(
f_out
,
checksum_seed
);
}
else
{
checksum_seed
=
read_int
(
f_in
);
}
checksum_init
();
}
flist.c
View file @
bc63ae3f
...
...
@@ -1042,7 +1042,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
/* now send the uid/gid list. This was introduced in protocol
version 15 */
if
(
f
!=
-
1
&&
remote_version
>=
15
)
{
if
(
f
!=
-
1
)
{
send_uid_list
(
f
);
}
...
...
@@ -1122,7 +1122,7 @@ struct file_list *recv_file_list(int f)
}
/* now recv the uid/gid list. This was introduced in protocol version 15 */
if
(
f
!=
-
1
&&
remote_version
>=
15
)
{
if
(
f
!=
-
1
)
{
recv_uid_list
(
f
,
flist
);
}
...
...
generator.c
View file @
bc63ae3f
...
...
@@ -516,19 +516,16 @@ void generate_files(int f,struct file_list *flist,char *local_name,int f_recv)
write_int
(
f
,
-
1
);
if
(
remote_version
>=
13
)
{
/* in newer versions of the protocol the files can cycle through
the system more than once to catch initial checksum errors */
for
(
i
=
read_int
(
f_recv
);
i
!=
-
1
;
i
=
read_int
(
f_recv
))
{
struct
file_struct
*
file
=
flist
->
files
[
i
];
recv_generator
(
local_name
?
local_name
:
f_name
(
file
),
flist
,
i
,
f
);
}
/* files can cycle through the system more than once
* to catch initial checksum errors */
for
(
i
=
read_int
(
f_recv
);
i
!=
-
1
;
i
=
read_int
(
f_recv
))
{
struct
file_struct
*
file
=
flist
->
files
[
i
];
recv_generator
(
local_name
?
local_name
:
f_name
(
file
),
flist
,
i
,
f
);
}
phase
++
;
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"generate_files phase=%d
\n
"
,
phase
);
phase
++
;
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"generate_files phase=%d
\n
"
,
phase
);
write_int
(
f
,
-
1
);
}
write_int
(
f
,
-
1
);
}
match.c
View file @
bc63ae3f
...
...
@@ -24,8 +24,6 @@ extern int csum_length;
extern
int
verbose
;
extern
int
am_server
;
extern
int
remote_version
;
typedef
unsigned
short
tag
;
#define TABLESIZE (1<<16)
...
...
@@ -322,13 +320,11 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len)
sum_end
(
file_sum
);
if
(
remote_version
>=
14
)
{
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"sending file_sum
\n
"
);
write_buf
(
f
,
file_sum
,
MD4_SUM_LENGTH
);
if
(
write_batch
)
/* dw */
write_batch_delta_file
(
file_sum
,
MD4_SUM_LENGTH
);
}
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"sending file_sum
\n
"
);
write_buf
(
f
,
file_sum
,
MD4_SUM_LENGTH
);
if
(
write_batch
)
/* dw */
write_batch_delta_file
(
file_sum
,
MD4_SUM_LENGTH
);
if
(
targets
)
{
free
(
targets
);
...
...
receiver.c
View file @
bc63ae3f
...
...
@@ -306,15 +306,13 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
sum_end
(
file_sum1
);
if
(
remote_version
>=
14
)
{
read_buf
(
f_in
,
file_sum2
,
MD4_SUM_LENGTH
);
if
(
verbose
>
2
)
{
rprintf
(
FINFO
,
"got file_sum
\n
"
);
}
if
(
fd
!=
-
1
&&
memcmp
(
file_sum1
,
file_sum2
,
MD4_SUM_LENGTH
)
!=
0
)
{
return
0
;
}
read_buf
(
f_in
,
file_sum2
,
MD4_SUM_LENGTH
);
if
(
verbose
>
2
)
{
rprintf
(
FINFO
,
"got file_sum
\n
"
);
}
if
(
fd
!=
-
1
&&
memcmp
(
file_sum1
,
file_sum2
,
MD4_SUM_LENGTH
)
!=
0
)
{
return
0
;
}
return
1
;
}
...
...
@@ -353,7 +351,7 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
i
=
read_int
(
f_in
);
if
(
i
==
-
1
)
{
if
(
phase
==
0
&&
remote_version
>=
13
)
{
if
(
phase
==
0
)
{
phase
++
;
csum_length
=
SUM_LENGTH
;
if
(
verbose
>
2
)
...
...
sender.c
View file @
bc63ae3f
...
...
@@ -20,7 +20,6 @@
#include "rsync.h"
extern
int
verbose
;
extern
int
remote_version
;
extern
int
csum_length
;
extern
struct
stats
stats
;
extern
int
io_error
;
...
...
@@ -118,7 +117,7 @@ void send_files(struct file_list *flist,int f_out,int f_in)
i
=
read_int
(
f_in
);
if
(
i
==
-
1
)
{
if
(
phase
==
0
&&
remote_version
>=
13
)
{
if
(
phase
==
0
)
{
phase
++
;
csum_length
=
SUM_LENGTH
;
write_int
(
f_out
,
-
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment