Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ZerXes
Tor
Commits
22ef7330
Commit
22ef7330
authored
Oct 15, 2003
by
Nick Mathewson
🎨
Browse files
Make add_file_log return 0 on success.
svn:r594
parent
7432d973
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/common/log.c
View file @
22ef7330
...
...
@@ -155,12 +155,13 @@ void add_stream_log(int loglevel, const char *name, FILE *stream)
logfiles
=
lf
;
}
void
add_file_log
(
int
loglevel
,
const
char
*
filename
)
int
add_file_log
(
int
loglevel
,
const
char
*
filename
)
{
FILE
*
f
;
f
=
fopen
(
filename
,
"a"
);
if
(
!
f
)
return
;
if
(
!
f
)
return
-
1
;
add_stream_log
(
loglevel
,
filename
,
f
);
logfiles
->
needs_close
=
1
;
return
0
;
}
src/common/log.h
View file @
22ef7330
...
...
@@ -28,7 +28,7 @@
void
log_set_severity
(
int
severity
);
void
add_stream_log
(
int
loglevel
,
const
char
*
name
,
FILE
*
stream
);
void
add_file_log
(
int
severity
,
const
char
*
filename
);
int
add_file_log
(
int
severity
,
const
char
*
filename
);
void
close_logs
();
void
reset_logs
();
...
...
Write
Preview
Supports
Markdown
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