From a075d35ca850f06170553d17ca464f0f5feadd97 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 8 Oct 2013 18:28:51 +0000 Subject: separate Folders handles removed from protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@6405 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/MraAvatars.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'protocols/MRA') diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index bef9b87180..f4a22c4d06 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -24,7 +24,6 @@ struct MRA_AVATARS_QUEUE : public FIFO_MT int iThreadsCount; HANDLE hThread[MAXIMUM_WAIT_OBJECTS]; LONG lThreadsRunningCount; - HANDLE hAvatarsPath; }; struct MRA_AVATARS_QUEUE_ITEM : public FIFO_MT_ITEM @@ -68,17 +67,12 @@ DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle) char szBuffer[MAX_PATH]; mir_snprintf(szBuffer, SIZEOF(szBuffer), "%s %s", m_szModuleName, Translate("Avatars' plugin connections")); - NETLIBUSER nlu = {0}; - nlu.cbSize = sizeof(nlu); + NETLIBUSER nlu = { sizeof(nlu) }; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS; nlu.szSettingsModule = MRA_AVT_SECT_NAME; nlu.szDescriptiveName = szBuffer; pmraaqAvatarsQueue->m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); if (pmraaqAvatarsQueue->m_hNetlibUser) { - TCHAR tszPath[ MAX_PATH ]; - mir_sntprintf( tszPath, SIZEOF(tszPath), _T("%%miranda_avatarcache%%\\%s"), m_tszUserName); - pmraaqAvatarsQueue->hAvatarsPath = FoldersRegisterCustomPathT(LPGEN("Avatars"), m_szModuleName, tszPath, m_tszUserName); - InterlockedExchange((volatile LONG*)&pmraaqAvatarsQueue->bIsRunning, TRUE); pmraaqAvatarsQueue->hThreadEvent = CreateEvent(NULL, FALSE, FALSE, NULL); pmraaqAvatarsQueue->iThreadsCount = db_get_dw(NULL, MRA_AVT_SECT_NAME, "WorkThreadsCount", MRA_AVT_DEFAULT_WRK_THREAD_COUNTS); @@ -504,13 +498,7 @@ DWORD CMraProto::MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, HANDLE hConta MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = (MRA_AVATARS_QUEUE*)hAvatarsQueueHandle; TCHAR tszBase[MAX_PATH]; - if (pmraaqAvatarsQueue->hAvatarsPath == NULL) - // default path - mir_sntprintf(tszBase, MAX_PATH, _T("%s\\%s\\"), VARST( _T("%miranda_avatarcache%")), m_tszUserName); - else { - FoldersGetCustomPathT(pmraaqAvatarsQueue->hAvatarsPath, tszBase, MAX_PATH, _T("")); - _tcsncat(tszBase, _T("\\"), MAX_PATH); - } + mir_sntprintf(tszBase, SIZEOF(tszBase), _T("%s\\%s\\"), VARST( _T("%miranda_avatarcache%")), m_tszUserName); res = tszBase; // some path in buff and free space for file name is avaible -- cgit v1.2.3