summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/job_delete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FTPFileYM/src/job_delete.cpp')
-rw-r--r--plugins/FTPFileYM/src/job_delete.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/FTPFileYM/src/job_delete.cpp b/plugins/FTPFileYM/src/job_delete.cpp
index 63c50f8d88..0baa219117 100644
--- a/plugins/FTPFileYM/src/job_delete.cpp
+++ b/plugins/FTPFileYM/src/job_delete.cpp
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "job_delete.h"
Event DeleteJob::jobDone;
-Mutex DeleteJob::mutexJobCount;
+mir_cs DeleteJob::mutexJobCount;
int DeleteJob::iRunningJobCount = 0;
extern ServerList &ftpList;
@@ -41,23 +41,23 @@ void DeleteJob::waitingThread(void *arg)
while(!Miranda_Terminated())
{
- Lock *lock = new Lock(mutexJobCount);
+ mir_cslockfull lock(mutexJobCount);
if (iRunningJobCount < MAX_RUNNING_JOBS)
{
iRunningJobCount++;
- delete lock;
+ lock.unlock();
job->run();
delete job;
- Lock *lock = new Lock(mutexJobCount);
+ lock.lock();
iRunningJobCount--;
- delete lock;
+ lock.unlock();
jobDone.release();
return;
}
- delete lock;
+ lock.unlock();
jobDone.wait();
}