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
a9766ef1
Commit
a9766ef1
authored
Nov 15, 1998
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log filename(line) in exit_cleanup() to make tracking down problems
easier in rsync daemons.
parent
5a788ade
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
cleanup.c
cleanup.c
+2
-2
log.c
log.c
+4
-3
main.c
main.c
+1
-1
rsync.h
rsync.h
+1
-0
No files found.
cleanup.c
View file @
a9766ef1
...
@@ -31,7 +31,7 @@ static int cleanup_fd1, cleanup_fd2;
...
@@ -31,7 +31,7 @@ static int cleanup_fd1, cleanup_fd2;
static
struct
map_struct
*
cleanup_buf
;
static
struct
map_struct
*
cleanup_buf
;
static
int
cleanup_pid
=
0
;
static
int
cleanup_pid
=
0
;
void
exit_cleanup
(
int
cod
e
)
void
_exit_cleanup
(
int
code
,
const
char
*
file
,
int
lin
e
)
{
{
extern
int
keep_partial
;
extern
int
keep_partial
;
...
@@ -58,7 +58,7 @@ void exit_cleanup(int code)
...
@@ -58,7 +58,7 @@ void exit_cleanup(int code)
}
}
}
}
if
(
code
)
log_exit
(
code
);
if
(
code
)
log_exit
(
code
,
file
,
line
);
exit
(
code
);
exit
(
code
);
}
}
...
...
log.c
View file @
a9766ef1
...
@@ -295,7 +295,7 @@ void log_recv(struct file_struct *file, struct stats *initial_stats)
...
@@ -295,7 +295,7 @@ void log_recv(struct file_struct *file, struct stats *initial_stats)
}
}
/* called when the transfer is interrupted for some reason */
/* called when the transfer is interrupted for some reason */
void
log_exit
(
int
code
)
void
log_exit
(
int
code
,
const
char
*
file
,
int
line
)
{
{
if
(
code
==
0
)
{
if
(
code
==
0
)
{
extern
struct
stats
stats
;
extern
struct
stats
stats
;
...
@@ -304,7 +304,8 @@ void log_exit(int code)
...
@@ -304,7 +304,8 @@ void log_exit(int code)
(
double
)
stats
.
total_read
,
(
double
)
stats
.
total_read
,
(
double
)
stats
.
total_size
);
(
double
)
stats
.
total_size
);
}
else
{
}
else
{
rprintf
(
FLOG
,
"transfer interrupted (code %d)
\n
"
,
code
);
rprintf
(
FLOG
,
"transfer interrupted (code %d) at %s(%d)
\n
"
,
code
,
file
,
line
);
}
}
}
}
...
@@ -313,7 +314,7 @@ void log_exit(int code)
...
@@ -313,7 +314,7 @@ void log_exit(int code)
it i called when a file starts to be transferred
it i called when a file starts to be transferred
*/
*/
void
log_transfer
(
struct
file_struct
*
file
,
char
*
fname
)
void
log_transfer
(
struct
file_struct
*
file
,
c
onst
c
har
*
fname
)
{
{
extern
int
verbose
;
extern
int
verbose
;
...
...
main.c
View file @
a9766ef1
...
@@ -36,7 +36,7 @@ static void report(int f)
...
@@ -36,7 +36,7 @@ static void report(int f)
extern
int
do_stats
;
extern
int
do_stats
;
if
(
am_daemon
)
{
if
(
am_daemon
)
{
log_exit
(
0
);
log_exit
(
0
,
__FILE__
,
__LINE__
);
if
(
f
==
-
1
||
!
am_sender
)
return
;
if
(
f
==
-
1
||
!
am_sender
)
return
;
}
}
...
...
rsync.h
View file @
a9766ef1
...
@@ -484,3 +484,4 @@ size_t strlcpy(char *d, const char *s, size_t bufsize);
...
@@ -484,3 +484,4 @@ size_t strlcpy(char *d, const char *s, size_t bufsize);
size_t
strlcat
(
char
*
d
,
const
char
*
s
,
size_t
bufsize
);
size_t
strlcat
(
char
*
d
,
const
char
*
s
,
size_t
bufsize
);
#endif
#endif
#define exit_cleanup(code) _exit_cleanup(code, __FILE__, __LINE__)
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