Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2c505b4b
Commit
2c505b4b
authored
Oct 14, 2006
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upnp_cc: compile fix (tested this time)
upnp_intel: fix a potential crash, and add some more debug output
parent
9cbc1e85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
modules/services_discovery/upnp_cc.cpp
modules/services_discovery/upnp_cc.cpp
+9
-15
modules/services_discovery/upnp_intel.cpp
modules/services_discovery/upnp_intel.cpp
+13
-3
No files found.
modules/services_discovery/upnp_cc.cpp
View file @
2c505b4b
...
@@ -73,6 +73,7 @@ struct services_discovery_sys_t
...
@@ -73,6 +73,7 @@ struct services_discovery_sys_t
{
{
/* playlist node */
/* playlist node */
playlist_item_t
*
p_node
;
playlist_item_t
*
p_node
;
playlist_item_t
*
p_node_cat
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
;
};
};
...
@@ -92,9 +93,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -92,9 +93,6 @@ static int Open( vlc_object_t *p_this )
services_discovery_sys_t
*
p_sys
=
(
services_discovery_sys_t
*
)
services_discovery_sys_t
*
p_sys
=
(
services_discovery_sys_t
*
)
malloc
(
sizeof
(
services_discovery_sys_t
)
);
malloc
(
sizeof
(
services_discovery_sys_t
)
);
playlist_view_t
*
p_view
;
vlc_value_t
val
;
p_sd
->
pf_run
=
Run
;
p_sd
->
pf_run
=
Run
;
p_sd
->
p_sys
=
p_sys
;
p_sd
->
p_sys
=
p_sys
;
...
@@ -108,14 +106,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -108,14 +106,9 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
p_view
=
playlist_ViewFind
(
p_sys
->
p_playlist
,
VIEW_CATEGORY
);
playlist_NodesPairCreate
(
p_sys
->
p_playlist
,
_
(
"Devices"
),
p_sys
->
p_node
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
VIEW_CATEGORY
,
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node
,
"UPnP"
,
p_view
->
p_root
);
VLC_TRUE
);
p_sys
->
p_node
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_sys
->
p_playlist
,
"intf-change"
,
val
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -132,6 +125,8 @@ static void Close( vlc_object_t *p_this )
...
@@ -132,6 +125,8 @@ static void Close( vlc_object_t *p_this )
{
{
playlist_NodeDelete
(
p_sys
->
p_playlist
,
p_sys
->
p_node
,
VLC_TRUE
,
playlist_NodeDelete
(
p_sys
->
p_playlist
,
p_sys
->
p_node
,
VLC_TRUE
,
VLC_TRUE
);
VLC_TRUE
);
playlist_NodeDelete
(
p_sys
->
p_playlist
,
p_sys
->
p_node_cat
,
VLC_TRUE
,
VLC_TRUE
);
vlc_object_release
(
p_sys
->
p_playlist
);
vlc_object_release
(
p_sys
->
p_playlist
);
}
}
...
@@ -227,8 +222,7 @@ playlist_item_t *UPnPHandler::AddDevice( Device *dev )
...
@@ -227,8 +222,7 @@ playlist_item_t *UPnPHandler::AddDevice( Device *dev )
*/
*/
char
*
str
=
strdup
(
dev
->
getFriendlyName
(
)
);
char
*
str
=
strdup
(
dev
->
getFriendlyName
(
)
);
p_item
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
VIEW_CATEGORY
,
p_item
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
str
,
p_sys
->
p_node
);
str
,
p_sys
->
p_node
);
p_item
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
p_item
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
msg_Dbg
(
p_sd
,
"device %s added"
,
str
);
msg_Dbg
(
p_sd
,
"device %s added"
,
str
);
free
(
str
);
free
(
str
);
...
@@ -264,7 +258,7 @@ void UPnPHandler::AddContent( playlist_item_t *p_parent, ContentNode *node )
...
@@ -264,7 +258,7 @@ void UPnPHandler::AddContent( playlist_item_t *p_parent, ContentNode *node )
playlist_item_t
*
p_item
;
playlist_item_t
*
p_item
;
p_item
=
playlist_ItemNew
(
p_sd
,
iNode
->
getResource
(),
title
);
p_item
=
playlist_ItemNew
(
p_sd
,
iNode
->
getResource
(),
title
);
playlist_NodeAddItem
(
p_sys
->
p_playlist
,
p_item
,
VIEW_CATEGORY
,
playlist_NodeAddItem
(
p_sys
->
p_playlist
,
p_item
,
p_parent
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
p_parent
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
}
else
if
(
node
->
isContainerNode
()
)
}
else
if
(
node
->
isContainerNode
()
)
...
@@ -272,7 +266,7 @@ void UPnPHandler::AddContent( playlist_item_t *p_parent, ContentNode *node )
...
@@ -272,7 +266,7 @@ void UPnPHandler::AddContent( playlist_item_t *p_parent, ContentNode *node )
ContainerNode
*
conNode
=
(
ContainerNode
*
)
node
;
ContainerNode
*
conNode
=
(
ContainerNode
*
)
node
;
char
*
p_name
=
strdup
(
title
);
/* See other comment on strdup */
char
*
p_name
=
strdup
(
title
);
/* See other comment on strdup */
playlist_item_t
*
p_node
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
VIEW_CATEGORY
,
playlist_item_t
*
p_node
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
p_name
,
p_parent
);
p_name
,
p_parent
);
free
(
p_name
);
free
(
p_name
);
...
...
modules/services_discovery/upnp_intel.cpp
View file @
2c505b4b
...
@@ -310,9 +310,11 @@ static void Close( vlc_object_t *p_this )
...
@@ -310,9 +310,11 @@ static void Close( vlc_object_t *p_this )
if
(
p_sys
->
p_playlist
)
if
(
p_sys
->
p_playlist
)
{
{
playlist_NodeDelete
(
p_sys
->
p_playlist
,
p_sys
->
p_node
,
VLC_TRUE
,
playlist_NodeDelete
(
p_sys
->
p_playlist
,
p_sys
->
p_node
,
VLC_TRUE
,
VLC_TRUE
);
VLC_TRUE
);
vlc_object_release
(
p_sys
->
p_playlist
);
playlist_NodeDelete
(
p_sys
->
p_playlist
,
p_sys
->
p_node_cat
,
VLC_TRUE
,
VLC_TRUE
);
vlc_object_release
(
p_sys
->
p_playlist
);
}
}
free
(
p_sys
);
free
(
p_sys
);
...
@@ -476,6 +478,14 @@ static int Callback( Upnp_EventType eventType, void* event, void* pCookie )
...
@@ -476,6 +478,14 @@ static int Callback( Upnp_EventType eventType, void* event, void* pCookie )
}
}
break
;
break
;
case
UPNP_EVENT_SUBSCRIBE_COMPLETE
:
msg_Warn
(
cookie
->
serviceDiscovery
,
"subscription complete"
);
break
;
case
UPNP_DISCOVERY_SEARCH_TIMEOUT
:
msg_Warn
(
cookie
->
serviceDiscovery
,
"search timeout"
);
break
;
default:
default:
msg_Dbg
(
cookie
->
serviceDiscovery
,
"%s:%d: DEBUG: UNHANDLED EVENT ( TYPE=%d )"
,
__FILE__
,
__LINE__
,
eventType
);
msg_Dbg
(
cookie
->
serviceDiscovery
,
"%s:%d: DEBUG: UNHANDLED EVENT ( TYPE=%d )"
,
__FILE__
,
__LINE__
,
eventType
);
break
;
break
;
...
...
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