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
d3a659d9
Commit
d3a659d9
authored
Aug 25, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved static lock inside Cookie.
parent
c42248cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
modules/services_discovery/upnp_intel.cpp
modules/services_discovery/upnp_intel.cpp
+5
-6
No files found.
modules/services_discovery/upnp_intel.cpp
View file @
d3a659d9
...
...
@@ -77,6 +77,7 @@ typedef struct
services_discovery_t
*
serviceDiscovery
;
UpnpClient_Handle
clientHandle
;
MediaServerList
*
serverList
;
Lockable
*
lock
;
}
Cookie
;
...
...
@@ -275,7 +276,6 @@ vlc_module_end();
// More prototypes...
static
Lockable
*
CallbackLock
;
static
int
Callback
(
Upnp_EventType
eventType
,
void
*
event
,
void
*
pCookie
);
const
char
*
xml_getChildElementValue
(
IXML_Element
*
parent
,
const
char
*
tagName
);
...
...
@@ -333,8 +333,7 @@ static void Run( services_discovery_t* p_sd )
Cookie
cookie
;
cookie
.
serviceDiscovery
=
p_sd
;
cookie
.
serverList
=
new
MediaServerList
(
&
cookie
);
CallbackLock
=
new
Lockable
(
&
cookie
);
cookie
.
lock
=
new
Lockable
();
res
=
UpnpRegisterClient
(
Callback
,
&
cookie
,
&
cookie
.
clientHandle
);
if
(
res
!=
UPNP_E_SUCCESS
)
...
...
@@ -361,7 +360,7 @@ static void Run( services_discovery_t* p_sd )
shutDown:
UpnpFinish
();
delete
cookie
.
serverList
;
delete
CallbackL
ock
;
delete
cookie
.
l
ock
;
}
...
...
@@ -419,10 +418,10 @@ IXML_Document* parseBrowseResult( IXML_Document* doc )
// Handles all UPnP events
static
int
Callback
(
Upnp_EventType
eventType
,
void
*
event
,
void
*
pCookie
)
{
Locker
locker
(
CallbackLock
);
Cookie
*
cookie
=
(
Cookie
*
)
pCookie
;
Locker
locker
(
cookie
->
lock
);
switch
(
eventType
)
{
case
UPNP_DISCOVERY_ADVERTISEMENT_ALIVE
:
...
...
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