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
9ae7a2cd
Commit
9ae7a2cd
authored
Dec 28, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use write_ndx() and read_ndx().
parent
8a65e0ce
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
flist.c
flist.c
+4
-4
generator.c
generator.c
+8
-8
main.c
main.c
+1
-1
rsync.c
rsync.c
+1
-1
sender.c
sender.c
+4
-4
No files found.
flist.c
View file @
9ae7a2cd
...
...
@@ -1300,7 +1300,7 @@ void send_extra_file_list(int f, int at_least)
flist
=
flist_new
(
0
,
"send_extra_file_list"
);
start_write
=
stats
.
total_written
;
write_
int
(
f
,
NDX_FLIST_OFFSET
-
send_dir_ndx
);
write_
ndx
(
f
,
NDX_FLIST_OFFSET
-
send_dir_ndx
);
change_local_filter_dir
(
fbuf
,
dlen
,
send_dir_depth
);
send_directory
(
f
,
flist
,
send_dir_ndx
,
fbuf
,
dlen
,
FLAG_DIVERT_DIRS
|
FLAG_XFER_DIR
);
write_byte
(
f
,
0
);
...
...
@@ -1319,7 +1319,7 @@ void send_extra_file_list(int f, int at_least)
}
else
{
while
(
DIR_NEXT_SIBLING
(
dp
)
<
0
)
{
if
((
send_dir_ndx
=
DIR_PARENT
(
dp
))
<
0
)
{
write_
int
(
f
,
NDX_FLIST_EOF
);
write_
ndx
(
f
,
NDX_FLIST_EOF
);
flist_eof
=
1
;
change_local_filter_dir
(
NULL
,
0
,
0
);
goto
finish
;
...
...
@@ -1630,7 +1630,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
* was just 1 item in the first file-list, send 1 more
* file-list to check if this is a 1-file xfer. */
if
(
send_dir_ndx
<
0
)
write_
int
(
f
,
NDX_DONE
);
write_
ndx
(
f
,
NDX_DONE
);
else
send_extra_file_list
(
f
,
1
);
}
...
...
@@ -1743,7 +1743,7 @@ struct file_list *recv_file_list(int f)
void
recv_additional_file_list
(
int
f
)
{
struct
file_list
*
flist
;
int
ndx
=
read_
int
(
f
);
int
ndx
=
read_
ndx
(
f
);
if
(
ndx
==
NDX_DONE
)
{
flist_eof
=
1
;
change_local_filter_dir
(
NULL
,
0
,
0
);
...
...
generator.c
View file @
9ae7a2cd
...
...
@@ -554,7 +554,7 @@ void itemize(struct file_struct *file, int ndx, int statret,
||
stdout_format_has_i
>
1
||
(
xname
&&
*
xname
))
&&
!
read_batch
)
{
if
(
protocol_version
>=
29
)
{
if
(
ndx
>=
0
)
write_
int
(
sock_f_out
,
ndx
+
cur_flist
->
ndx_start
);
write_
ndx
(
sock_f_out
,
ndx
+
cur_flist
->
ndx_start
);
write_shortint
(
sock_f_out
,
iflags
);
if
(
iflags
&
ITEM_BASIS_TYPE_FOLLOWS
)
write_byte
(
sock_f_out
,
fnamecmp_type
);
...
...
@@ -1605,7 +1605,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
if
(
preserve_hard_links
&&
F_IS_HLINKED
(
file
))
file
->
flags
|=
FLAG_FILE_SENT
;
#endif
write_
int
(
f_out
,
ndx
+
cur_flist
->
ndx_start
);
write_
ndx
(
f_out
,
ndx
+
cur_flist
->
ndx_start
);
if
(
itemizing
)
{
int
iflags
=
ITEM_TRANSFER
;
if
(
always_checksum
>
0
)
...
...
@@ -1771,7 +1771,7 @@ void generate_files(int f_out, char *local_name)
phase
);
}
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
}
csum_length
=
SUM_LENGTH
;
...
...
@@ -1865,10 +1865,10 @@ void generate_files(int f_out, char *local_name)
}
}
flist_free
(
cur_flist
);
flist_free
(
first_flist
);
/* updates cur_flist & first_flist */
if
(
!
read_batch
)
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
}
}
while
((
cur_flist
=
next_flist
)
!=
NULL
);
...
...
@@ -1876,10 +1876,10 @@ void generate_files(int f_out, char *local_name)
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"generate_files phase=%d
\n
"
,
phase
);
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
/* Reduce round-trip lag-time for a useless delay-updates phase. */
if
(
protocol_version
>=
29
&&
!
delay_updates
)
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
/* Read MSG_DONE for the redo phase (and any prior messages). */
while
(
done_cnt
<=
1
)
{
...
...
@@ -1892,7 +1892,7 @@ void generate_files(int f_out, char *local_name)
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"generate_files phase=%d
\n
"
,
phase
);
if
(
delay_updates
)
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
/* Read MSG_DONE for delay-updates phase & prior messages. */
while
(
done_cnt
==
2
)
wait_for_receiver
();
...
...
main.c
View file @
9ae7a2cd
...
...
@@ -776,7 +776,7 @@ static int do_recv(int f_in, int f_out, char *local_name)
io_flush
(
FULL_FLUSH
);
if
(
protocol_version
>=
24
)
{
/* send a final goodbye message */
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
}
io_flush
(
FULL_FLUSH
);
...
...
rsync.c
View file @
9ae7a2cd
...
...
@@ -105,7 +105,7 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr,
read_loop:
while
(
1
)
{
ndx
=
read_
int
(
f_in
);
ndx
=
read_
ndx
(
f_in
);
if
(
ndx
>=
0
)
break
;
...
...
sender.c
View file @
9ae7a2cd
...
...
@@ -149,7 +149,7 @@ void successful_send(int ndx)
void
write_ndx_and_attrs
(
int
f_out
,
int
ndx
,
int
iflags
,
uchar
fnamecmp_type
,
char
*
buf
,
int
len
)
{
write_
int
(
f_out
,
ndx
);
write_
ndx
(
f_out
,
ndx
);
if
(
protocol_version
<
29
)
return
;
write_shortint
(
f_out
,
iflags
);
...
...
@@ -191,7 +191,7 @@ void send_files(int f_in, int f_out)
if
(
incremental
&&
first_flist
)
{
flist_free
(
first_flist
);
if
(
first_flist
)
{
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
continue
;
}
}
...
...
@@ -199,7 +199,7 @@ void send_files(int f_in, int f_out)
break
;
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"send_files phase=%d
\n
"
,
phase
);
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
continue
;
}
...
...
@@ -354,5 +354,5 @@ void send_files(int f_in, int f_out)
match_report
();
write_
int
(
f_out
,
NDX_DONE
);
write_
ndx
(
f_out
,
NDX_DONE
);
}
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