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
456603d4
Commit
456603d4
authored
Apr 13, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upnp: update copyright dates according to git blame -C -C
parent
18fd4540
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
57 deletions
+34
-57
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.cpp
+33
-56
modules/services_discovery/upnp.hpp
modules/services_discovery/upnp.hpp
+1
-1
No files found.
modules/services_discovery/upnp.cpp
View file @
456603d4
/*****************************************************************************
/*****************************************************************************
* Upnp.cpp : UPnP discovery module (libupnp)
* Upnp.cpp : UPnP discovery module (libupnp)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2004-20
08
the VideoLAN team
* Copyright (C) 2004-20
11
the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Rémi Denis-Courmont <rem # videolan.org> (original plugin)
* Authors: Rémi Denis-Courmont <rem # videolan.org> (original plugin)
...
@@ -25,9 +25,6 @@
...
@@ -25,9 +25,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
/*
\TODO: Debug messages: "__FILE__, __LINE__" ok ???, Wrn/Err ???
*/
#undef PACKAGE_NAME
#undef PACKAGE_NAME
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include "config.h"
# include "config.h"
...
@@ -221,10 +218,8 @@ static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data
...
@@ -221,10 +218,8 @@ static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data
i_res
=
UpnpDownloadXmlDoc
(
p_discovery
->
Location
,
&
p_description_doc
);
i_res
=
UpnpDownloadXmlDoc
(
p_discovery
->
Location
,
&
p_description_doc
);
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
p_sd
,
msg_Warn
(
p_sd
,
"Could not download device description! "
"%s:%d: Could not download device description!"
,
"Fetching data from %s failed: %s"
,
__FILE__
,
__LINE__
);
msg_Dbg
(
p_sd
,
"Fetching data from %s failed: %s"
,
p_discovery
->
Location
,
UpnpGetErrorMessage
(
i_res
)
);
p_discovery
->
Location
,
UpnpGetErrorMessage
(
i_res
)
);
return
i_res
;
return
i_res
;
}
}
...
@@ -274,9 +269,7 @@ static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data
...
@@ -274,9 +269,7 @@ static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data
break
;
break
;
default:
default:
msg_Dbg
(
p_sd
,
msg_Err
(
p_sd
,
"Unhandled event, please report ( type=%d )"
,
event_type
);
"%s:%d: DEBUG: UNHANDLED EVENT ( TYPE=%d )"
,
__FILE__
,
__LINE__
,
event_type
);
break
;
break
;
}
}
...
@@ -294,13 +287,13 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
...
@@ -294,13 +287,13 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
{
{
if
(
!
p_doc
)
if
(
!
p_doc
)
{
{
msg_
Dbg
(
p_sd
,
"%s:%d: NULL"
,
__FILE__
,
__LINE__
);
msg_
Err
(
p_sd
,
"Null IXML_Document"
);
return
;
return
;
}
}
if
(
!
p_location
)
if
(
!
p_location
)
{
{
msg_
Dbg
(
p_sd
,
"%s:%d: NULL"
,
__FILE__
,
__LINE__
);
msg_
Err
(
p_sd
,
"Null location"
);
return
;
return
;
}
}
...
@@ -335,9 +328,7 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
...
@@ -335,9 +328,7 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
"deviceType"
);
"deviceType"
);
if
(
!
psz_device_type
)
if
(
!
psz_device_type
)
{
{
msg_Dbg
(
p_sd
,
msg_Warn
(
p_sd
,
"No deviceType found!"
);
"%s:%d: no deviceType!"
,
__FILE__
,
__LINE__
);
continue
;
continue
;
}
}
...
@@ -347,16 +338,14 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
...
@@ -347,16 +338,14 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
const
char
*
psz_udn
=
xml_getChildElementValue
(
p_device_element
,
"UDN"
);
const
char
*
psz_udn
=
xml_getChildElementValue
(
p_device_element
,
"UDN"
);
if
(
!
psz_udn
)
if
(
!
psz_udn
)
{
{
msg_Dbg
(
p_sd
,
"%s:%d: no UDN!"
,
msg_Warn
(
p_sd
,
"No UDN!"
);
__FILE__
,
__LINE__
);
continue
;
continue
;
}
}
// Check if server is already added
// Check if server is already added
if
(
p_sd
->
p_sys
->
p_server_list
->
getServer
(
psz_udn
)
!=
0
)
if
(
p_sd
->
p_sys
->
p_server_list
->
getServer
(
psz_udn
)
!=
0
)
{
{
msg_Dbg
(
p_sd
,
"%s:%d: server with uuid '%s' already exists."
,
msg_Warn
(
p_sd
,
"Server with uuid '%s' already exists."
,
psz_udn
);
__FILE__
,
__LINE__
,
psz_udn
);
continue
;
continue
;
}
}
...
@@ -366,7 +355,7 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
...
@@ -366,7 +355,7 @@ void MediaServer::parseDeviceDescription( IXML_Document* p_doc,
if
(
!
psz_friendly_name
)
if
(
!
psz_friendly_name
)
{
{
msg_Dbg
(
p_sd
,
"
%s:%d: no friendlyName!"
,
__FILE__
,
__LINE__
);
msg_Dbg
(
p_sd
,
"
No friendlyName!"
);
continue
;
continue
;
}
}
...
@@ -531,8 +520,7 @@ void MediaServer::subscribeToContentDirectory()
...
@@ -531,8 +520,7 @@ void MediaServer::subscribeToContentDirectory()
}
}
else
else
{
{
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"Subscribe failed: '%s': %s"
,
"%s:%d: WARNING: '%s': %s"
,
__FILE__
,
__LINE__
,
getFriendlyName
(),
UpnpGetErrorMessage
(
i_res
)
);
getFriendlyName
(),
UpnpGetErrorMessage
(
i_res
)
);
}
}
}
}
...
@@ -569,8 +557,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
...
@@ -569,8 +557,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"AddToAction 'ObjectID' failed: %s"
,
"%s:%d: ERROR: %s"
,
__FILE__
,
__LINE__
,
UpnpGetErrorMessage
(
i_res
)
);
UpnpGetErrorMessage
(
i_res
)
);
goto
browseActionCleanup
;
goto
browseActionCleanup
;
}
}
...
@@ -580,8 +567,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
...
@@ -580,8 +567,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"AddToAction 'BrowseFlag' failed: %s"
,
"%s:%d: ERROR: %s"
,
__FILE__
,
__LINE__
,
UpnpGetErrorMessage
(
i_res
)
);
UpnpGetErrorMessage
(
i_res
)
);
goto
browseActionCleanup
;
goto
browseActionCleanup
;
}
}
...
@@ -591,8 +577,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
...
@@ -591,8 +577,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"AddToAction 'Filter' failed: %s"
,
"%s:%d: ERROR: %s"
,
__FILE__
,
__LINE__
,
UpnpGetErrorMessage
(
i_res
)
);
UpnpGetErrorMessage
(
i_res
)
);
goto
browseActionCleanup
;
goto
browseActionCleanup
;
}
}
...
@@ -602,8 +587,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
...
@@ -602,8 +587,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"AddToAction 'StartingIndex' failed: %s"
,
"%s:%d: ERROR: %s"
,
__FILE__
,
__LINE__
,
UpnpGetErrorMessage
(
i_res
)
);
UpnpGetErrorMessage
(
i_res
)
);
goto
browseActionCleanup
;
goto
browseActionCleanup
;
}
}
...
@@ -613,17 +597,17 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
...
@@ -613,17 +597,17 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"AddToAction 'RequestedCount' failed: %s"
,
"%s:%d: ERROR: %s"
,
__FILE__
,
__LINE__
,
UpnpGetErrorMessage
(
i_res
)
);
UpnpGetErrorMessage
(
i_res
)
);
goto
browseActionCleanup
;
}
goto
browseActionCleanup
;
}
i_res
=
UpnpAddToAction
(
&
p_action
,
"Browse"
,
i_res
=
UpnpAddToAction
(
&
p_action
,
"Browse"
,
psz_service_type
,
"SortCriteria"
,
psz_sort_criteria
);
psz_service_type
,
"SortCriteria"
,
psz_sort_criteria
);
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"AddToAction 'SortCriteria' failed: %s"
,
"%s:%d: ERROR: %s"
,
__FILE__
,
__LINE__
,
UpnpGetErrorMessage
(
i_res
)
);
UpnpGetErrorMessage
(
i_res
)
);
goto
browseActionCleanup
;
goto
browseActionCleanup
;
}
}
...
@@ -637,16 +621,14 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
...
@@ -637,16 +621,14 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
if
(
i_res
!=
UPNP_E_SUCCESS
)
if
(
i_res
!=
UPNP_E_SUCCESS
)
{
{
msg_Dbg
(
_p_sd
,
msg_Err
(
_p_sd
,
"%s when trying the send() action with URL: %s"
,
"%s:%d: ERROR: %s when trying the send() action with URL: %s"
,
__FILE__
,
__LINE__
,
UpnpGetErrorMessage
(
i_res
),
psz_url
);
UpnpGetErrorMessage
(
i_res
),
psz_url
);
ixmlDocument_free
(
p_response
);
ixmlDocument_free
(
p_response
);
p_response
=
0
;
p_response
=
0
;
}
}
browseActionCleanup:
browseActionCleanup:
free
(
psz_object_id
);
free
(
psz_object_id
);
free
(
psz_browse_flag
);
free
(
psz_browse_flag
);
...
@@ -685,8 +667,7 @@ bool MediaServer::_fetchContents( Container* p_parent )
...
@@ -685,8 +667,7 @@ bool MediaServer::_fetchContents( Container* p_parent )
{
{
if
(
!
p_parent
)
if
(
!
p_parent
)
{
{
msg_Dbg
(
_p_sd
,
msg_Err
(
_p_sd
,
"No parent"
);
"%s:%d: parent==NULL"
,
__FILE__
,
__LINE__
);
return
false
;
return
false
;
}
}
...
@@ -695,9 +676,7 @@ bool MediaServer::_fetchContents( Container* p_parent )
...
@@ -695,9 +676,7 @@ bool MediaServer::_fetchContents( Container* p_parent )
"*"
,
"0"
,
"0"
,
""
);
"*"
,
"0"
,
"0"
,
""
);
if
(
!
p_response
)
if
(
!
p_response
)
{
{
msg_Dbg
(
_p_sd
,
msg_Err
(
_p_sd
,
"No response from browse() action"
);
"%s:%d: ERROR! No response from browse() action"
,
__FILE__
,
__LINE__
);
return
false
;
return
false
;
}
}
...
@@ -706,8 +685,7 @@ bool MediaServer::_fetchContents( Container* p_parent )
...
@@ -706,8 +685,7 @@ bool MediaServer::_fetchContents( Container* p_parent )
if
(
!
p_result
)
if
(
!
p_result
)
{
{
msg_Dbg
(
_p_sd
,
"%s:%d: ERROR! browse() response parsing failed"
,
msg_Err
(
_p_sd
,
"browse() response parsing failed"
);
__FILE__
,
__LINE__
);
return
false
;
return
false
;
}
}
...
@@ -921,8 +899,7 @@ void MediaServerList::removeServer( const char* psz_udn )
...
@@ -921,8 +899,7 @@ void MediaServerList::removeServer( const char* psz_udn )
MediaServer
*
p_server
=
getServer
(
psz_udn
);
MediaServer
*
p_server
=
getServer
(
psz_udn
);
if
(
!
p_server
)
return
;
if
(
!
p_server
)
return
;
msg_Dbg
(
_p_sd
,
msg_Dbg
(
_p_sd
,
"Removing server '%s'"
,
p_server
->
getFriendlyName
()
);
"Removing server '%s'"
,
p_server
->
getFriendlyName
()
);
std
::
vector
<
MediaServer
*>::
iterator
it
;
std
::
vector
<
MediaServer
*>::
iterator
it
;
for
(
it
=
_list
.
begin
();
it
!=
_list
.
end
();
++
it
)
for
(
it
=
_list
.
begin
();
it
!=
_list
.
end
();
++
it
)
...
...
modules/services_discovery/upnp.hpp
View file @
456603d4
/*****************************************************************************
/*****************************************************************************
* Upnp.hpp : UPnP discovery module (libupnp) header
* Upnp.hpp : UPnP discovery module (libupnp) header
*****************************************************************************
*****************************************************************************
* Copyright (C) 2004-20
08
the VideoLAN team
* Copyright (C) 2004-20
10
the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Rémi Denis-Courmont <rem # videolan.org> (original plugin)
* Authors: Rémi Denis-Courmont <rem # videolan.org> (original plugin)
...
...
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