Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
4676ccbc
Commit
4676ccbc
authored
Nov 29, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now using buffer I/O to write debug logs (huge performance increase).
parent
c80fb561
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
src/interface/intf_msg.c
src/interface/intf_msg.c
+6
-14
No files found.
src/interface/intf_msg.c
View file @
4676ccbc
...
@@ -93,10 +93,9 @@ typedef struct intf_msg_s
...
@@ -93,10 +93,9 @@ typedef struct intf_msg_s
#ifdef DEBUG_LOG
#ifdef DEBUG_LOG
/* Log file */
/* Log file */
int
i
_log_file
;
/* log file */
FILE
*
p
_log_file
;
/* log file */
#endif
#endif
//#if 0
#if !defined(INTF_MSG_QUEUE) && !defined(DEBUG_LOG)
#if !defined(INTF_MSG_QUEUE) && !defined(DEBUG_LOG)
/* If neither messages queue, neither log file is used, then the structure
/* If neither messages queue, neither log file is used, then the structure
* is empty. However, empty structures are not allowed in C. Therefore, a
* is empty. However, empty structures are not allowed in C. Therefore, a
...
@@ -152,14 +151,7 @@ p_intf_msg_t intf_MsgCreate( void )
...
@@ -152,14 +151,7 @@ p_intf_msg_t intf_MsgCreate( void )
/* Log file initialization - on failure, file pointer will be null,
/* Log file initialization - on failure, file pointer will be null,
* and no log will be issued, but this is not considered as an
* and no log will be issued, but this is not considered as an
* error */
* error */
p_msg
->
i_log_file
=
open
(
DEBUG_LOG
,
O_CREAT
|
O_TRUNC
|
p_msg
->
p_log_file
=
fopen
(
DEBUG_LOG
,
"w"
);
#ifndef SYS_BSD
O_SYNC
|
#else
O_ASYNC
|
#endif
/* SYS_BSD */
O_WRONLY
,
0666
);
#endif
#endif
}
}
return
(
p_msg
);
return
(
p_msg
);
...
@@ -178,9 +170,9 @@ void intf_MsgDestroy( void )
...
@@ -178,9 +170,9 @@ void intf_MsgDestroy( void )
#ifdef DEBUG_LOG
#ifdef DEBUG_LOG
/* Close log file if any */
/* Close log file if any */
if
(
p_main
->
p_msg
->
i_log_file
>=
0
)
if
(
p_main
->
p_msg
->
p_log_file
!=
NULL
)
{
{
close
(
p_main
->
p_msg
->
i
_log_file
);
fclose
(
p_main
->
p_msg
->
p
_log_file
);
}
}
#endif
#endif
...
@@ -592,9 +584,9 @@ static void PrintMsg( intf_msg_item_t *p_msg )
...
@@ -592,9 +584,9 @@ static void PrintMsg( intf_msg_item_t *p_msg )
#ifdef DEBUG_LOG
#ifdef DEBUG_LOG
/* Append all messages to log file */
/* Append all messages to log file */
if
(
p_main
->
p_msg
->
i_log_file
>=
0
)
if
(
p_main
->
p_msg
->
p_log_file
!=
NULL
)
{
{
write
(
p_main
->
p_msg
->
i_log_file
,
psz_msg
,
strlen
(
psz_msg
)
);
fwrite
(
psz_msg
,
strlen
(
psz_msg
),
1
,
p_main
->
p_msg
->
p_log_file
);
}
}
#endif
#endif
...
...
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