Changeset 2c505b4b808ba239eef56089d7e97bf68465e8e9
- Timestamp:
- 14/10/06 22:08:05
(2 years ago)
- Author:
- Sigmund Augdal Helberg <sigmunau@videolan.org>
- git-committer:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1160856485 +0000
- git-parent:
[9cbc1e852c40541aef57361f870f57feeef541f9]
- git-author:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1160856485 +0000
- Message:
upnp_cc: compile fix (tested this time)
upnp_intel: fix a potential crash, and add some more debug output
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r18f8461 |
r2c505b4 |
|
| 74 | 74 | /* playlist node */ |
|---|
| 75 | 75 | playlist_item_t *p_node; |
|---|
| | 76 | playlist_item_t *p_node_cat; |
|---|
| 76 | 77 | playlist_t *p_playlist; |
|---|
| 77 | 78 | }; |
|---|
| … | … | |
| 92 | 93 | services_discovery_sys_t *p_sys = (services_discovery_sys_t *) |
|---|
| 93 | 94 | malloc( sizeof( services_discovery_sys_t ) ); |
|---|
| 94 | | |
|---|
| 95 | | playlist_view_t *p_view; |
|---|
| 96 | | vlc_value_t val; |
|---|
| 97 | 95 | |
|---|
| 98 | 96 | p_sd->pf_run = Run; |
|---|
| … | … | |
| 109 | 107 | } |
|---|
| 110 | 108 | |
|---|
| 111 | | p_view = playlist_ViewFind( p_sys->p_playlist, VIEW_CATEGORY ); |
|---|
| 112 | | p_sys->p_node = playlist_NodeCreate( p_sys->p_playlist, VIEW_CATEGORY, |
|---|
| 113 | | "UPnP", p_view->p_root ); |
|---|
| 114 | | p_sys->p_node->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| 115 | | p_sys->p_node->i_flags &= ~PLAYLIST_SKIP_FLAG; |
|---|
| 116 | | val.b_bool = VLC_TRUE; |
|---|
| 117 | | var_Set( p_sys->p_playlist, "intf-change", val ); |
|---|
| 118 | | |
|---|
| | 109 | playlist_NodesPairCreate( p_sys->p_playlist, _("Devices"), |
|---|
| | 110 | &p_sys->p_node_cat, &p_sys->p_node, |
|---|
| | 111 | VLC_TRUE ); |
|---|
| 119 | 112 | return VLC_SUCCESS; |
|---|
| 120 | 113 | } |
|---|
| … | … | |
| 132 | 125 | { |
|---|
| 133 | 126 | playlist_NodeDelete( p_sys->p_playlist, p_sys->p_node, VLC_TRUE, |
|---|
| | 127 | VLC_TRUE ); |
|---|
| | 128 | playlist_NodeDelete( p_sys->p_playlist, p_sys->p_node_cat, VLC_TRUE, |
|---|
| 134 | 129 | VLC_TRUE ); |
|---|
| 135 | 130 | vlc_object_release( p_sys->p_playlist ); |
|---|
| … | … | |
| 228 | 223 | char *str = strdup( dev->getFriendlyName( ) ); |
|---|
| 229 | 224 | |
|---|
| 230 | | p_item = playlist_NodeCreate( p_sys->p_playlist, VIEW_CATEGORY, |
|---|
| 231 | | str, p_sys->p_node ); |
|---|
| | 225 | p_item = playlist_NodeCreate( p_sys->p_playlist, str, p_sys->p_node ); |
|---|
| 232 | 226 | p_item->i_flags &= ~PLAYLIST_SKIP_FLAG; |
|---|
| 233 | 227 | msg_Dbg( p_sd, "device %s added", str ); |
|---|
| … | … | |
| 265 | 259 | p_item = playlist_ItemNew( p_sd, iNode->getResource(), title ); |
|---|
| 266 | 260 | |
|---|
| 267 | | playlist_NodeAddItem( p_sys->p_playlist, p_item, VIEW_CATEGORY, |
|---|
| | 261 | playlist_NodeAddItem( p_sys->p_playlist, p_item, |
|---|
| 268 | 262 | p_parent, PLAYLIST_APPEND, PLAYLIST_END ); |
|---|
| 269 | 263 | |
|---|
| … | … | |
| 273 | 267 | |
|---|
| 274 | 268 | char* p_name = strdup(title); /* See other comment on strdup */ |
|---|
| 275 | | playlist_item_t* p_node = playlist_NodeCreate( p_sys->p_playlist, VIEW_CATEGORY, |
|---|
| | 269 | playlist_item_t* p_node = playlist_NodeCreate( p_sys->p_playlist, |
|---|
| 276 | 270 | p_name, p_parent ); |
|---|
| 277 | 271 | free(p_name); |
|---|
| r85f6dac |
r2c505b4 |
|
| 311 | 311 | if( p_sys->p_playlist ) |
|---|
| 312 | 312 | { |
|---|
| 313 | | playlist_NodeDelete( p_sys->p_playlist, p_sys->p_node, VLC_TRUE, |
|---|
| 314 | | VLC_TRUE ); |
|---|
| 315 | | vlc_object_release( p_sys->p_playlist ); |
|---|
| | 313 | playlist_NodeDelete( p_sys->p_playlist, p_sys->p_node, VLC_TRUE, |
|---|
| | 314 | VLC_TRUE ); |
|---|
| | 315 | playlist_NodeDelete( p_sys->p_playlist, p_sys->p_node_cat, VLC_TRUE, |
|---|
| | 316 | VLC_TRUE ); |
|---|
| | 317 | vlc_object_release( p_sys->p_playlist ); |
|---|
| 316 | 318 | } |
|---|
| 317 | 319 | |
|---|
| … | … | |
| 477 | 479 | break; |
|---|
| 478 | 480 | |
|---|
| | 481 | case UPNP_EVENT_SUBSCRIBE_COMPLETE: |
|---|
| | 482 | msg_Warn( cookie->serviceDiscovery, "subscription complete" ); |
|---|
| | 483 | break; |
|---|
| | 484 | |
|---|
| | 485 | case UPNP_DISCOVERY_SEARCH_TIMEOUT: |
|---|
| | 486 | msg_Warn( cookie->serviceDiscovery, "search timeout" ); |
|---|
| | 487 | break; |
|---|
| | 488 | |
|---|
| 479 | 489 | default: |
|---|
| 480 | 490 | msg_Dbg( cookie->serviceDiscovery, "%s:%d: DEBUG: UNHANDLED EVENT ( TYPE=%d )", __FILE__, __LINE__, eventType ); |
|---|