Permalink
Browse files

changed: sanitize the cpluff logging levels

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31941 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent 15de189 commit dec0bfe31b8f347264d62f41e7409b7f379887bb jmarshallnz committed Jul 18, 2010
Showing with 5 additions and 15 deletions.
  1. +5 −15 xbmc/addons/AddonManager.cpp
@@ -700,26 +700,16 @@ bool CAddonMgr::AddonsFromRepoXML(const TiXmlElement *root, VECADDONS &addons)
int cp_to_clog(cp_log_severity_t lvl)
{
- if( lvl == CP_LOG_DEBUG )
- return 0;
- else if (lvl == CP_LOG_INFO)
- return 1;
- else if (lvl == CP_LOG_WARNING)
- return 3;
- else
- return 4;
+ if (lvl >= CP_LOG_ERROR)
+ return LOGINFO;
+ return LOGDEBUG;
}
cp_log_severity_t clog_to_cp(int lvl)
{
- if (lvl >= 4)
- return CP_LOG_ERROR;
- else if (lvl == 3)
- return CP_LOG_WARNING;
- else if (lvl >= 1)
+ if (lvl >= LOG_LEVEL_DEBUG)
return CP_LOG_INFO;
- else
- return CP_LOG_DEBUG;
+ return CP_LOG_ERROR;
}
void cp_fatalErrorHandler(const char *msg)

0 comments on commit dec0bfe

Please sign in to comment.