diff options
Diffstat (limited to 'protocols/Xfire/src/Xfire_avatar_loader.cpp')
-rw-r--r-- | protocols/Xfire/src/Xfire_avatar_loader.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/protocols/Xfire/src/Xfire_avatar_loader.cpp b/protocols/Xfire/src/Xfire_avatar_loader.cpp index 0b3a4c213f..92787213e6 100644 --- a/protocols/Xfire/src/Xfire_avatar_loader.cpp +++ b/protocols/Xfire/src/Xfire_avatar_loader.cpp @@ -3,14 +3,14 @@ Xfire_avatar_loader::Xfire_avatar_loader(xfirelib::Client* client) { - threadrunning = FALSE; - this->client = client; + m_threadrunning = FALSE; + m_client = client; } Xfire_avatar_loader::~Xfire_avatar_loader() { //liste leeren, damit der laufende thread abgebrochen wird - list.clear(); + m_list.clear(); } void Xfire_avatar_loader::loadThread(void *arg) @@ -21,37 +21,37 @@ void Xfire_avatar_loader::loadThread(void *arg) if (!loader) return; - mir_cslock lck(loader->avatarMutex); - loader->threadrunning = TRUE; + mir_cslock lck(loader->m_avatarMutex); + loader->m_threadrunning = TRUE; while (1) { //keinen avatarload auftrag mehr - if (!loader->list.size()) + if (!loader->m_list.size()) break; //letzten load process holen - Xfire_avatar_process process = loader->list.back(); + Xfire_avatar_process process = loader->m_list.back(); //buddyinfo abfragen GetBuddyInfo buddyinfo; - buddyinfo.userid = process.userid; - if (loader->client) - if (loader->client->connected) { - loader->client->send(&buddyinfo); + buddyinfo.userid = process.m_userid; + if (loader->m_client) + if (loader->m_client->m_connected) { + loader->m_client->send(&buddyinfo); } else //nicht mehr verbunden? dann liste leeren und schleife abbrechen { - loader->list.clear(); + loader->m_list.clear(); break; } //auftrag entfernen - loader->list.pop_back(); + loader->m_list.pop_back(); Sleep(1000); } - loader->threadrunning = FALSE; + loader->m_threadrunning = FALSE; return; } @@ -61,17 +61,17 @@ BOOL Xfire_avatar_loader::loadAvatar(MCONTACT hcontact, char*username, unsigned Xfire_avatar_process process = { 0 }; //struktur füllen - process.hcontact = hcontact; + process.m_hcontact = hcontact; if (username) - strcpy_s(process.username, 128, username); - process.userid = userid; + strcpy_s(process.m_username, 128, username); + process.m_userid = userid; //Avataranfrage an die liste übergeben - this->list.push_back(process); + this->m_list.push_back(process); - if (!threadrunning && client != NULL) { + if (!m_threadrunning && m_client != NULL) { mir_forkthread(Xfire_avatar_loader::loadThread, this); } return TRUE; -}
\ No newline at end of file +} |