Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
be0759d4
Commit
be0759d4
authored
Jan 18, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/upnp/Discovery: don't copy XML to std::string
Pass "const char *" to Expat.
parent
339d9398
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Device.cxx
src/db/upnp/Device.cxx
+2
-2
Device.hxx
src/db/upnp/Device.hxx
+1
-1
Discovery.hxx
src/db/upnp/Discovery.hxx
+1
-1
No files found.
src/db/upnp/Device.cxx
View file @
be0759d4
...
...
@@ -99,12 +99,12 @@ protected:
}
};
UPnPDevice
::
UPnPDevice
(
const
std
::
string
&
url
,
const
std
::
string
&
description
)
UPnPDevice
::
UPnPDevice
(
const
std
::
string
&
url
,
const
char
*
description
)
:
ok
(
false
)
{
UPnPDeviceParser
mparser
(
*
this
);
Error
error
;
if
(
!
mparser
.
Parse
(
description
.
data
(),
description
.
length
(
),
true
,
if
(
!
mparser
.
Parse
(
description
,
strlen
(
description
),
true
,
error
))
{
// TODO: pass Error to caller
LogError
(
error
);
...
...
src/db/upnp/Device.hxx
View file @
be0759d4
...
...
@@ -82,7 +82,7 @@ public:
* @param url where the description came from
* @param description the xml device description
*/
UPnPDevice
(
const
std
::
string
&
url
,
const
std
::
string
&
description
);
UPnPDevice
(
const
std
::
string
&
url
,
const
char
*
description
);
UPnPDevice
()
:
ok
(
false
)
{}
};
...
...
src/db/upnp/Discovery.hxx
View file @
be0759d4
...
...
@@ -66,7 +66,7 @@ class UPnPDeviceDirectory {
class
ContentDirectoryDescriptor
{
public
:
ContentDirectoryDescriptor
(
const
std
::
string
&
url
,
const
std
::
string
&
description
,
const
char
*
description
,
time_t
last
,
int
exp
)
:
device
(
url
,
description
),
last_seen
(
last
),
expires
(
exp
+
20
)
{}
UPnPDevice
device
;
...
...
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