Skip to content

Commit

Permalink
fixed: Ticket #10752 freeze when trying to login
Browse files Browse the repository at this point in the history
  • Loading branch information
chadoe committed May 9, 2011
1 parent 366bf45 commit 51e528a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 3 additions & 7 deletions xbmc/network/libscrobbler/scrobbler.cpp
Expand Up @@ -48,7 +48,6 @@
CScrobbler::CScrobbler(const CStdString &strHandshakeURL, const CStdString &strLogPrefix)
: CThread()
{
m_bRunThread = false;
m_bBanned = false;
m_bBadAuth = false;
m_pHttp = NULL;
Expand All @@ -72,14 +71,12 @@ void CScrobbler::Init()
ResetState();
LoadCredentials();
LoadJournal();
if (!m_bRunThread)
if (!ThreadHandle())
Create();
}

void CScrobbler::Term()
{
m_bRunThread = false;
SetEvent(m_hEvent);
StopThread();
SaveJournal();
}
Expand Down Expand Up @@ -643,11 +640,10 @@ void CScrobbler::Process()
if (!(m_pHttp = new XFILE::CFileCurl))
return;
}
m_bRunThread = true;
while (1)
while (!m_bStop)
{
WaitForSingleObject(m_hEvent, INFINITE);
if (!m_bRunThread)
if (m_bStop)
break;

if (m_strSessionID.IsEmpty())
Expand Down
1 change: 0 additions & 1 deletion xbmc/network/libscrobbler/scrobbler.h
Expand Up @@ -113,7 +113,6 @@ typedef std::vector<SubmissionJournalEntry>::iterator SCROBBLERJOURNALITERATOR;
class CScrobbler : public CThread
{
protected:
bool m_bRunThread;
bool m_bNotified;
bool m_bSubmitting;
bool m_bSubmitted;
Expand Down

0 comments on commit 51e528a

Please sign in to comment.