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
37f35d89
Commit
37f35d89
authored
Dec 08, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made msg_list_push() static and renamed it to msg_list_flush().
parent
08c88178
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
io.c
io.c
+13
-13
No files found.
io.c
View file @
37f35d89
...
@@ -244,16 +244,6 @@ static void msg_list_add(int code, char *buf, int len)
...
@@ -244,16 +244,6 @@ static void msg_list_add(int code, char *buf, int len)
msg_list
.
tail
=
ml
;
msg_list
.
tail
=
ml
;
}
}
void
send_msg
(
enum
msgcode
code
,
char
*
buf
,
int
len
)
{
if
(
msg_fd_out
<
0
)
{
io_multiplex_write
(
code
,
buf
,
len
);
return
;
}
msg_list_add
(
code
,
buf
,
len
);
msg_list_push
(
NORMAL_FLUSH
);
}
/* Read a message from the MSG_* fd and handle it. This is called either
/* Read a message from the MSG_* fd and handle it. This is called either
* during the early stages of being a local sender (up through the sending
* during the early stages of being a local sender (up through the sending
* of the file list) or when we're the generator (to fetch the messages
* of the file list) or when we're the generator (to fetch the messages
...
@@ -333,7 +323,7 @@ static void read_msg_fd(void)
...
@@ -333,7 +323,7 @@ static void read_msg_fd(void)
/* Try to push messages off the list onto the wire. If we leave with more
/* Try to push messages off the list onto the wire. If we leave with more
* to do, return 0. On error, return -1. If everything flushed, return 1.
* to do, return 0. On error, return -1. If everything flushed, return 1.
* This is only active in the receiver. */
* This is only active in the receiver. */
int
msg_list_p
ush
(
int
flush_it_all
)
static
int
msg_list_fl
ush
(
int
flush_it_all
)
{
{
static
int
written
=
0
;
static
int
written
=
0
;
struct
timeval
tv
;
struct
timeval
tv
;
...
@@ -370,6 +360,16 @@ int msg_list_push(int flush_it_all)
...
@@ -370,6 +360,16 @@ int msg_list_push(int flush_it_all)
return
1
;
return
1
;
}
}
void
send_msg
(
enum
msgcode
code
,
char
*
buf
,
int
len
)
{
if
(
msg_fd_out
<
0
)
{
io_multiplex_write
(
code
,
buf
,
len
);
return
;
}
msg_list_add
(
code
,
buf
,
len
);
msg_list_flush
(
NORMAL_FLUSH
);
}
int
get_redo_num
(
int
itemizing
,
enum
logcode
code
)
int
get_redo_num
(
int
itemizing
,
enum
logcode
code
)
{
{
while
(
1
)
{
while
(
1
)
{
...
@@ -503,7 +503,7 @@ static int read_timeout(int fd, char *buf, size_t len)
...
@@ -503,7 +503,7 @@ static int read_timeout(int fd, char *buf, size_t len)
}
}
if
(
msg_list
.
head
&&
FD_ISSET
(
msg_fd_out
,
&
w_fds
))
if
(
msg_list
.
head
&&
FD_ISSET
(
msg_fd_out
,
&
w_fds
))
msg_list_
p
ush
(
NORMAL_FLUSH
);
msg_list_
fl
ush
(
NORMAL_FLUSH
);
if
(
io_filesfrom_f_out
>=
0
)
{
if
(
io_filesfrom_f_out
>=
0
)
{
if
(
io_filesfrom_buflen
)
{
if
(
io_filesfrom_buflen
)
{
...
@@ -1148,7 +1148,7 @@ static void mplex_write(enum msgcode code, char *buf, size_t len)
...
@@ -1148,7 +1148,7 @@ static void mplex_write(enum msgcode code, char *buf, size_t len)
void
io_flush
(
int
flush_it_all
)
void
io_flush
(
int
flush_it_all
)
{
{
msg_list_
p
ush
(
flush_it_all
);
msg_list_
fl
ush
(
flush_it_all
);
if
(
!
iobuf_out_cnt
||
no_flush
)
if
(
!
iobuf_out_cnt
||
no_flush
)
return
;
return
;
...
...
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