Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
f2c0c9a5
Commit
f2c0c9a5
authored
Apr 20, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
messages: remove redundant cancellation handling
parent
fba2ed8a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
27 deletions
+0
-27
modules/logger/android.c
modules/logger/android.c
+0
-3
modules/logger/console.c
modules/logger/console.c
+0
-8
modules/logger/file.c
modules/logger/file.c
+0
-8
modules/logger/journal.c
modules/logger/journal.c
+0
-3
modules/logger/syslog.c
modules/logger/syslog.c
+0
-3
src/misc/messages.c
src/misc/messages.c
+0
-2
No files found.
modules/logger/android.c
View file @
f2c0c9a5
...
@@ -46,8 +46,6 @@ static void AndroidPrintMsg(void *opaque, int type, const vlc_log_t *p_item,
...
@@ -46,8 +46,6 @@ static void AndroidPrintMsg(void *opaque, int type, const vlc_log_t *p_item,
if
(
verbose
<
type
)
if
(
verbose
<
type
)
return
;
return
;
int
canc
=
vlc_savecancel
();
if
(
asprintf
(
&
format2
,
"[%0*"
PRIxPTR
"] %s %s: %s"
,
if
(
asprintf
(
&
format2
,
"[%0*"
PRIxPTR
"] %s %s: %s"
,
ptr_width
,
p_item
->
i_object_id
,
p_item
->
psz_module
,
ptr_width
,
p_item
->
i_object_id
,
p_item
->
psz_module
,
p_item
->
psz_object_type
,
format
)
<
0
)
p_item
->
psz_object_type
,
format
)
<
0
)
...
@@ -68,7 +66,6 @@ static void AndroidPrintMsg(void *opaque, int type, const vlc_log_t *p_item,
...
@@ -68,7 +66,6 @@ static void AndroidPrintMsg(void *opaque, int type, const vlc_log_t *p_item,
}
}
__android_log_vprint
(
prio
,
"VLC"
,
format2
,
ap
);
__android_log_vprint
(
prio
,
"VLC"
,
format2
,
ap
);
free
(
format2
);
free
(
format2
);
vlc_restorecancel
(
canc
);
}
}
static
vlc_log_cb
Open
(
vlc_object_t
*
obj
,
void
**
sysp
)
static
vlc_log_cb
Open
(
vlc_object_t
*
obj
,
void
**
sysp
)
...
...
modules/logger/console.c
View file @
f2c0c9a5
...
@@ -52,8 +52,6 @@ static void LogConsoleColor(void *opaque, int type, const vlc_log_t *meta,
...
@@ -52,8 +52,6 @@ static void LogConsoleColor(void *opaque, int type, const vlc_log_t *meta,
if
(
verbose
<
type
)
if
(
verbose
<
type
)
return
;
return
;
int
canc
=
vlc_savecancel
();
flockfile
(
stream
);
flockfile
(
stream
);
fprintf
(
stream
,
"["
GREEN
"%0*"
PRIxPTR
GRAY
"] "
,
ptr_width
,
fprintf
(
stream
,
"["
GREEN
"%0*"
PRIxPTR
GRAY
"] "
,
ptr_width
,
meta
->
i_object_id
);
meta
->
i_object_id
);
...
@@ -64,8 +62,6 @@ static void LogConsoleColor(void *opaque, int type, const vlc_log_t *meta,
...
@@ -64,8 +62,6 @@ static void LogConsoleColor(void *opaque, int type, const vlc_log_t *meta,
vfprintf
(
stream
,
format
,
ap
);
vfprintf
(
stream
,
format
,
ap
);
fputs
(
GRAY
"
\n
"
,
stream
);
fputs
(
GRAY
"
\n
"
,
stream
);
funlockfile
(
stream
);
funlockfile
(
stream
);
vlc_restorecancel
(
canc
);
}
}
#endif
/* !_WIN32 */
#endif
/* !_WIN32 */
...
@@ -78,8 +74,6 @@ static void LogConsoleGray(void *opaque, int type, const vlc_log_t *meta,
...
@@ -78,8 +74,6 @@ static void LogConsoleGray(void *opaque, int type, const vlc_log_t *meta,
if
(
verbose
<
type
)
if
(
verbose
<
type
)
return
;
return
;
int
canc
=
vlc_savecancel
();
flockfile
(
stream
);
flockfile
(
stream
);
fprintf
(
stream
,
"[%0*"
PRIxPTR
"] "
,
ptr_width
,
meta
->
i_object_id
);
fprintf
(
stream
,
"[%0*"
PRIxPTR
"] "
,
ptr_width
,
meta
->
i_object_id
);
if
(
meta
->
psz_header
!=
NULL
)
if
(
meta
->
psz_header
!=
NULL
)
...
@@ -89,8 +83,6 @@ static void LogConsoleGray(void *opaque, int type, const vlc_log_t *meta,
...
@@ -89,8 +83,6 @@ static void LogConsoleGray(void *opaque, int type, const vlc_log_t *meta,
vfprintf
(
stream
,
format
,
ap
);
vfprintf
(
stream
,
format
,
ap
);
putc_unlocked
(
'\n'
,
stream
);
putc_unlocked
(
'\n'
,
stream
);
funlockfile
(
stream
);
funlockfile
(
stream
);
vlc_restorecancel
(
canc
);
}
}
static
vlc_log_cb
Open
(
vlc_object_t
*
obj
,
void
**
sysp
)
static
vlc_log_cb
Open
(
vlc_object_t
*
obj
,
void
**
sysp
)
...
...
modules/logger/file.c
View file @
f2c0c9a5
...
@@ -58,15 +58,11 @@ static void LogText(void *opaque, int type, const vlc_log_t *meta,
...
@@ -58,15 +58,11 @@ static void LogText(void *opaque, int type, const vlc_log_t *meta,
if
(
sys
->
verbosity
<
type
)
if
(
sys
->
verbosity
<
type
)
return
;
return
;
int
canc
=
vlc_savecancel
();
flockfile
(
stream
);
flockfile
(
stream
);
fprintf
(
stream
,
"%s%s: "
,
meta
->
psz_module
,
msg_type
[
type
]);
fprintf
(
stream
,
"%s%s: "
,
meta
->
psz_module
,
msg_type
[
type
]);
vfprintf
(
stream
,
format
,
ap
);
vfprintf
(
stream
,
format
,
ap
);
putc_unlocked
(
'\n'
,
stream
);
putc_unlocked
(
'\n'
,
stream
);
funlockfile
(
stream
);
funlockfile
(
stream
);
vlc_restorecancel
(
canc
);
}
}
#define HTML_FILENAME "vlc-log.html"
#define HTML_FILENAME "vlc-log.html"
...
@@ -100,8 +96,6 @@ static void LogHtml(void *opaque, int type, const vlc_log_t *meta,
...
@@ -100,8 +96,6 @@ static void LogHtml(void *opaque, int type, const vlc_log_t *meta,
if
(
sys
->
verbosity
<
type
)
if
(
sys
->
verbosity
<
type
)
return
;
return
;
int
canc
=
vlc_savecancel
();
flockfile
(
stream
);
flockfile
(
stream
);
fprintf
(
stream
,
"%s%s: <span style=
\"
color: #%06x
\"
>"
,
fprintf
(
stream
,
"%s%s: <span style=
\"
color: #%06x
\"
>"
,
meta
->
psz_module
,
msg_type
[
type
],
color
[
type
]);
meta
->
psz_module
,
msg_type
[
type
],
color
[
type
]);
...
@@ -109,8 +103,6 @@ static void LogHtml(void *opaque, int type, const vlc_log_t *meta,
...
@@ -109,8 +103,6 @@ static void LogHtml(void *opaque, int type, const vlc_log_t *meta,
vfprintf
(
stream
,
format
,
ap
);
vfprintf
(
stream
,
format
,
ap
);
fputs
(
"</span>
\n
"
,
stream
);
fputs
(
"</span>
\n
"
,
stream
);
funlockfile
(
stream
);
funlockfile
(
stream
);
vlc_restorecancel
(
canc
);
}
}
static
vlc_log_cb
Open
(
vlc_object_t
*
obj
,
void
**
restrict
sysp
)
static
vlc_log_cb
Open
(
vlc_object_t
*
obj
,
void
**
restrict
sysp
)
...
...
modules/logger/journal.c
View file @
f2c0c9a5
...
@@ -42,7 +42,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
...
@@ -42,7 +42,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
{
{
static
const
char
default_msg
[]
=
"message lost"
;
static
const
char
default_msg
[]
=
"message lost"
;
char
*
msg
;
char
*
msg
;
int
canc
=
vlc_savecancel
();
if
(
vasprintf
(
&
msg
,
format
,
ap
)
==
-
1
)
if
(
vasprintf
(
&
msg
,
format
,
ap
)
==
-
1
)
msg
=
(
char
*
)
default_msg
;
msg
=
(
char
*
)
default_msg
;
...
@@ -59,8 +58,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
...
@@ -59,8 +58,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
"VLC_HEADER=%s"
,
(
meta
->
psz_header
!=
NULL
)
?
meta
->
psz_header
:
""
,
"VLC_HEADER=%s"
,
(
meta
->
psz_header
!=
NULL
)
?
meta
->
psz_header
:
""
,
NULL
);
NULL
);
vlc_restorecancel
(
canc
);
if
(
msg
!=
default_msg
)
if
(
msg
!=
default_msg
)
free
(
msg
);
free
(
msg
);
(
void
)
opaque
;
(
void
)
opaque
;
...
...
modules/logger/syslog.c
View file @
f2c0c9a5
...
@@ -44,8 +44,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
...
@@ -44,8 +44,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
char
*
str
;
char
*
str
;
int
priority
=
priorities
[
type
];
int
priority
=
priorities
[
type
];
int
canc
=
vlc_savecancel
();
if
(
vasprintf
(
&
str
,
format
,
ap
)
==
-
1
)
if
(
vasprintf
(
&
str
,
format
,
ap
)
==
-
1
)
str
=
(
char
*
)
default_msg
;
str
=
(
char
*
)
default_msg
;
...
@@ -54,7 +52,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
...
@@ -54,7 +52,6 @@ static void Log(void *opaque, int type, const vlc_log_t *meta,
str
);
str
);
else
else
syslog
(
priority
,
"%s: %s"
,
meta
->
psz_module
,
str
);
syslog
(
priority
,
"%s: %s"
,
meta
->
psz_module
,
str
);
vlc_restorecancel
(
canc
);
if
(
str
!=
default_msg
)
if
(
str
!=
default_msg
)
free
(
str
);
free
(
str
);
...
...
src/misc/messages.c
View file @
f2c0c9a5
...
@@ -239,10 +239,8 @@ static void vlc_vaLogEarly(void *d, int type, const vlc_log_t *item,
...
@@ -239,10 +239,8 @@ static void vlc_vaLogEarly(void *d, int type, const vlc_log_t *item,
log
->
meta
.
line
=
item
->
line
;
log
->
meta
.
line
=
item
->
line
;
log
->
meta
.
func
=
item
->
func
;
log
->
meta
.
func
=
item
->
func
;
int
canc
=
vlc_savecancel
();
/* XXX: needed for vasprintf() ? */
if
(
vasprintf
(
&
log
->
msg
,
format
,
ap
)
==
-
1
)
if
(
vasprintf
(
&
log
->
msg
,
format
,
ap
)
==
-
1
)
log
->
msg
=
NULL
;
log
->
msg
=
NULL
;
vlc_restorecancel
(
canc
);
vlc_mutex_lock
(
&
sys
->
lock
);
vlc_mutex_lock
(
&
sys
->
lock
);
assert
(
sys
->
tailp
!=
NULL
);
assert
(
sys
->
tailp
!=
NULL
);
...
...
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