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
48097745
Commit
48097745
authored
Jan 10, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/upnp: remove "upnplog" option
We have removed all libupnp logging calls, and we don't need to debug libupnp.
parent
1091ca96
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
44 deletions
+2
-44
UpnpDatabasePlugin.cxx
src/db/UpnpDatabasePlugin.cxx
+1
-6
upnpplib.cxx
src/db/upnp/upnpplib.cxx
+1
-30
upnpplib.hxx
src/db/upnp/upnpplib.hxx
+0
-8
No files found.
src/db/UpnpDatabasePlugin.cxx
View file @
48097745
...
...
@@ -63,7 +63,6 @@ class UpnpDatabase : public Database {
LibUPnP
*
m_lib
;
UPnPDeviceDirectory
*
m_superdir
;
Directory
*
m_root
;
std
::
string
m_upnplog
;
public
:
UpnpDatabase
()
...
...
@@ -194,9 +193,8 @@ UpnpDatabase::Create(const config_param ¶m, Error &error)
}
bool
UpnpDatabase
::
Configure
(
const
config_param
&
param
,
Error
&
)
UpnpDatabase
::
Configure
(
const
config_param
&
,
Error
&
)
{
m_upnplog
=
param
.
GetBlockValue
(
"upnplog"
,
""
);
return
true
;
}
...
...
@@ -225,9 +223,6 @@ bool UpnpDatabase::reallyOpen(Error &error)
if
(
!
m_lib
)
return
false
;
if
(
!
m_upnplog
.
empty
())
{
m_lib
->
setLogFileName
(
m_upnplog
);
}
m_superdir
=
UPnPDeviceDirectory
::
getTheDir
();
if
(
!
m_superdir
||
!
m_superdir
->
ok
())
{
error
.
Set
(
upnp_domain
,
"Discovery services startup failed"
);
...
...
src/db/upnp/upnpplib.cxx
View file @
48097745
...
...
@@ -20,16 +20,10 @@
#include "config.h"
#include "upnpplib.hxx"
#include "Domain.hxx"
#include "Util.hxx"
#include "Log.hxx"
#include <string>
#include <map>
#include <vector>
#include <set>
#include <upnp/ixml.h>
#include <upnp/upnp
debug
.h>
#include <upnp/upnp
tools
.h>
static
LibUPnP
*
theLib
;
...
...
@@ -58,9 +52,6 @@ LibUPnP::LibUPnP()
}
setMaxContentLength
(
2000
*
1024
);
#ifdef DEBUG
UpnpCloseLog
();
#endif
code
=
UpnpRegisterClient
(
o_callback
,
(
void
*
)
this
,
&
m_clh
);
if
(
code
!=
UPNP_E_SUCCESS
)
{
...
...
@@ -79,26 +70,6 @@ void LibUPnP::setMaxContentLength(int bytes)
UpnpSetMaxContentLength
(
bytes
);
}
bool
LibUPnP
::
setLogFileName
(
const
std
::
string
&
fn
)
{
const
ScopeLock
protect
(
m_mutex
);
if
(
fn
.
empty
())
{
UpnpCloseLog
();
}
else
{
UpnpSetLogLevel
(
UPNP_INFO
);
UpnpSetLogFileNames
(
fn
.
c_str
(),
fn
.
c_str
());
int
code
=
UpnpInitLog
();
if
(
code
!=
UPNP_E_SUCCESS
)
{
FormatError
(
upnp_domain
,
"UpnpInitLog() failed: %s"
,
UpnpGetErrorMessage
(
code
));
return
false
;
}
}
return
true
;
}
void
LibUPnP
::
registerHandler
(
Upnp_EventType
et
,
Upnp_FunPtr
handler
,
void
*
cookie
)
{
...
...
src/db/upnp/upnpplib.hxx
View file @
48097745
...
...
@@ -23,11 +23,9 @@
#include "thread/Mutex.hxx"
#include "util/Error.hxx"
#include <string>
#include <map>
#include <upnp/upnp.h>
#include <upnp/upnptools.h>
/** Our link to libupnp. Initialize and keep the handle around */
class
LibUPnP
{
...
...
@@ -58,12 +56,6 @@ public:
/** Retrieve the singleton LibUPnP object */
static
LibUPnP
*
getLibUPnP
(
Error
&
error
);
/** Set log file name and activate logging.
*
* @param fn file name to use. Use empty string to turn logging off
*/
bool
setLogFileName
(
const
std
::
string
&
fn
);
/** Set max library buffer size for reading content from servers.
* The default is 200k and should be ok */
void
setMaxContentLength
(
int
bytes
);
...
...
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