Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7e1b4d53
Commit
7e1b4d53
authored
Nov 27, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused msg_Stack stuff
parent
aa25960c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
100 deletions
+1
-100
src/input/input.c
src/input/input.c
+1
-2
src/libvlc.h
src/libvlc.h
+0
-5
src/misc/messages.c
src/misc/messages.c
+0
-93
No files found.
src/input/input.c
View file @
7e1b4d53
...
...
@@ -2435,8 +2435,7 @@ static int InputSourceInit( input_thread_t *p_input,
{
if
(
vlc_object_alive
(
p_input
)
)
{
msg_Err
(
p_input
,
"open of `%s' failed: %s"
,
psz_mrl
,
msg_StackMsg
()
);
msg_Err
(
p_input
,
"open of `%s' failed"
,
psz_mrl
);
dialog_Fatal
(
p_input
,
_
(
"Your input can't be opened"
),
_
(
"VLC is unable to open the MRL '%s'."
" Check the log for details."
),
psz_mrl
);
...
...
src/libvlc.h
View file @
7e1b4d53
...
...
@@ -85,11 +85,6 @@ typedef struct msg_bank_t msg_bank_t;
msg_bank_t
*
msg_Create
(
void
);
void
msg_Destroy
(
msg_bank_t
*
);
/** Internal message stack context */
void
msg_StackSet
(
int
,
const
char
*
,
...
);
void
msg_StackAdd
(
const
char
*
,
...
);
const
char
*
msg_StackMsg
(
void
);
/*
* LibVLC exit event handling
*/
...
...
src/misc/messages.c
View file @
7e1b4d53
...
...
@@ -55,22 +55,6 @@
#include <vlc_charset.h>
#include "../libvlc.h"
typedef
struct
{
int
i_code
;
char
*
psz_message
;
}
msg_context_t
;
static
void
cleanup_msg_context
(
void
*
data
)
{
msg_context_t
*
ctx
=
data
;
free
(
ctx
->
psz_message
);
free
(
ctx
);
}
static
vlc_threadvar_t
msg_context
;
static
uintptr_t
banks
=
0
;
/*****************************************************************************
* Local macros
*****************************************************************************/
...
...
@@ -128,11 +112,6 @@ msg_bank_t *msg_Create (void)
/* C locale to get error messages in English in the logs */
bank
->
locale
=
newlocale
(
LC_MESSAGES_MASK
,
"C"
,
(
locale_t
)
0
);
vlc_mutex_lock
(
&
msg_stack_lock
);
if
(
banks
++
==
0
)
vlc_threadvar_create
(
&
msg_context
,
cleanup_msg_context
);
vlc_mutex_unlock
(
&
msg_stack_lock
);
return
bank
;
}
...
...
@@ -183,12 +162,6 @@ void msg_Destroy (msg_bank_t *bank)
if
(
unlikely
(
bank
->
i_sub
!=
0
))
fputs
(
"stale interface subscribers (LibVLC might crash)
\n
"
,
stderr
);
vlc_mutex_lock
(
&
msg_stack_lock
);
assert
(
banks
>
0
);
if
(
--
banks
==
0
)
vlc_threadvar_delete
(
&
msg_context
);
vlc_mutex_unlock
(
&
msg_stack_lock
);
if
(
bank
->
locale
!=
(
locale_t
)
0
)
freelocale
(
bank
->
locale
);
...
...
@@ -565,69 +538,3 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
#endif
vlc_restorecancel
(
canc
);
}
static
msg_context_t
*
GetContext
(
void
)
{
msg_context_t
*
p_ctx
=
vlc_threadvar_get
(
msg_context
);
if
(
p_ctx
==
NULL
)
{
p_ctx
=
malloc
(
sizeof
(
msg_context_t
)
);
if
(
!
p_ctx
)
return
NULL
;
p_ctx
->
psz_message
=
NULL
;
vlc_threadvar_set
(
msg_context
,
p_ctx
);
}
return
p_ctx
;
}
void
msg_StackSet
(
int
i_code
,
const
char
*
psz_message
,
...
)
{
va_list
ap
;
msg_context_t
*
p_ctx
=
GetContext
();
if
(
p_ctx
==
NULL
)
return
;
free
(
p_ctx
->
psz_message
);
va_start
(
ap
,
psz_message
);
if
(
vasprintf
(
&
p_ctx
->
psz_message
,
psz_message
,
ap
)
==
-
1
)
p_ctx
->
psz_message
=
NULL
;
va_end
(
ap
);
p_ctx
->
i_code
=
i_code
;
}
void
msg_StackAdd
(
const
char
*
psz_message
,
...
)
{
char
*
psz_tmp
;
va_list
ap
;
msg_context_t
*
p_ctx
=
GetContext
();
if
(
p_ctx
==
NULL
)
return
;
va_start
(
ap
,
psz_message
);
if
(
vasprintf
(
&
psz_tmp
,
psz_message
,
ap
)
==
-
1
)
psz_tmp
=
NULL
;
va_end
(
ap
);
if
(
!
p_ctx
->
psz_message
)
p_ctx
->
psz_message
=
psz_tmp
;
else
{
char
*
psz_new
;
if
(
asprintf
(
&
psz_new
,
"%s: %s"
,
psz_tmp
,
p_ctx
->
psz_message
)
==
-
1
)
psz_new
=
NULL
;
free
(
p_ctx
->
psz_message
);
p_ctx
->
psz_message
=
psz_new
;
free
(
psz_tmp
);
}
}
const
char
*
msg_StackMsg
(
void
)
{
msg_context_t
*
p_ctx
=
GetContext
();
assert
(
p_ctx
);
return
p_ctx
->
psz_message
;
}
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