Changeset 1303 for trunk/dll/dircnrs.c
- Timestamp:
- Nov 30, 2008, 6:31:35 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1222 r1303 49 49 25 Aug 08 GKY Check TMP directory space warn if lee than 5 MiB prevent archiver from opening if 50 50 less than 10 KiB (It hangs and can't be closed) 51 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 51 52 52 53 ***********************************************************************/ … … 798 799 dcd = WinQueryWindowPtr(hwnd, QWL_USER); 799 800 if (dcd) { 800 DosEnterCritSec(); 801 //DosEnterCritSec(); //GKY 11-29-08 802 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 801 803 if (dcd->stopflag) 802 804 dcd->stopflag--; 803 805 if (dcd->stopflag) { 804 DosExitCritSec(); 806 DosReleaseMutexSem(hmtxFM2Globals); 807 //DosExitCritSec(); 805 808 return 0; 806 809 } 807 DosExitCritSec(); 810 DosReleaseMutexSem(hmtxFM2Globals); 811 //DosExitCritSec(); 808 812 if (mp1) { 809 813 strcpy(dcd->previous, dcd->directory); … … 1419 1423 strcpy(dcd->previous, dcd->directory); 1420 1424 strcpy(dcd->directory, fullname); 1421 DosEnterCritSec();1425 //DosEnterCritSec(); //GKY 11-27-08 1422 1426 dcd->stopflag++; 1423 DosExitCritSec();1427 //DosExitCritSec(); 1424 1428 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 1425 1429 strcpy(dcd->directory, dcd->previous); 1426 DosEnterCritSec();1430 //DosEnterCritSec(); //GKY 11-27-08 1427 1431 dcd->stopflag--; 1428 DosExitCritSec();1432 //DosExitCritSec(); 1429 1433 } 1430 1434 else if (*dcd->directory) { … … 2286 2290 2287 2291 case IDM_RESCAN: 2288 DosEnterCritSec();2292 //DosEnterCritSec(); //GKY 11-27-08 2289 2293 dcd->stopflag++; 2290 DosExitCritSec();2294 //DosExitCritSec(); 2291 2295 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPVOID)) { 2292 DosEnterCritSec();2296 //DosEnterCritSec(); //GKY 11-27-08 2293 2297 dcd->stopflag--; 2294 DosExitCritSec();2298 //DosExitCritSec(); 2295 2299 } 2296 2300 break; … … 2424 2428 strcpy(dcd->previous, dcd->directory); 2425 2429 strcpy(dcd->directory, (CHAR *)mp2); 2426 DosEnterCritSec();2430 //DosEnterCritSec(); // GKY 11-27-08 2427 2431 dcd->stopflag++; 2428 DosExitCritSec();2432 //DosExitCritSec(); 2429 2433 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2430 2434 strcpy(dcd->directory, dcd->previous); 2431 DosEnterCritSec();2435 //DosEnterCritSec(); // GKY 11-27-08 2432 2436 dcd->stopflag--; 2433 DosExitCritSec();2437 //DosExitCritSec(); 2434 2438 } 2435 2439 else if (*dcd->directory) { … … 2458 2462 strcpy(dcd->previous, dcd->directory); 2459 2463 strcpy(dcd->directory, tempname2); 2460 DosEnterCritSec();2464 //DosEnterCritSec(); // GKY 11-27-08 2461 2465 dcd->stopflag++; 2462 DosExitCritSec();2466 //DosExitCritSec(); 2463 2467 if (!PostMsg(dcd->hwndObject, 2464 2468 UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2465 2469 strcpy(dcd->directory, dcd->previous); 2466 DosEnterCritSec();2470 //DosEnterCritSec();// GKY 11-27-08 2467 2471 dcd->stopflag--; 2468 DosExitCritSec();2472 //DosExitCritSec(); 2469 2473 } 2470 2474 else if (*dcd->directory) { … … 2490 2494 strcpy(dcd->directory, dcd->previous); 2491 2495 strcpy(dcd->previous, tempname); 2492 DosEnterCritSec();2496 //DosEnterCritSec(); // GKY 11-27-08 2493 2497 dcd->stopflag++; 2494 DosExitCritSec();2498 //DosExitCritSec(); 2495 2499 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2496 2500 strcpy(dcd->directory, dcd->previous); 2497 DosEnterCritSec();2501 //DosEnterCritSec(); // GKY 11-27-08 2498 2502 dcd->stopflag--; 2499 DosExitCritSec();2503 //DosExitCritSec(); 2500 2504 } 2501 2505 else if (*dcd->directory) { … … 2527 2531 strcpy(dcd->previous, dcd->directory); 2528 2532 strcpy(dcd->directory, newdir); 2529 DosEnterCritSec();2533 //DosEnterCritSec(); //GKY 11-27-08 2530 2534 dcd->stopflag++; 2531 DosExitCritSec();2535 //DosExitCritSec(); 2532 2536 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2533 2537 strcpy(dcd->directory, dcd->previous); 2534 DosEnterCritSec();2538 //DosEnterCritSec(); // GKY 11-27-08 2535 2539 dcd->stopflag--; 2536 DosExitCritSec();2540 //DosExitCritSec(); 2537 2541 } 2538 2542 else if (*dcd->directory) { … … 3363 3367 strcpy(dcd->previous, dcd->directory); 3364 3368 strcpy(dcd->directory, pci->pszFileName); 3365 DosEnterCritSec();3369 //DosEnterCritSec(); // GKY 11-27-08 3366 3370 dcd->stopflag++; 3367 DosExitCritSec();3371 //DosExitCritSec(); 3368 3372 if (!PostMsg(dcd->hwndObject, 3369 3373 UM_RESCAN, MPVOID, MPFROMLONG(1))) { 3370 DosEnterCritSec();3374 //DosEnterCritSec(); // GKY 11-27-08 3371 3375 dcd->stopflag--; 3372 DosExitCritSec();3376 //DosExitCritSec(); 3373 3377 } 3374 3378 else if (*dcd->directory) { … … 3410 3414 } 3411 3415 else { 3412 DosEnterCritSec();3416 //DosEnterCritSec(); // GKY 11-27-08 3413 3417 dcd->stopflag++; 3414 DosExitCritSec();3418 //DosExitCritSec(); 3415 3419 if (!PostMsg(dcd->hwndObject, 3416 3420 UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 3417 DosEnterCritSec();3421 //DosEnterCritSec(); // GKY 11-27-08 3418 3422 dcd->stopflag--; 3419 DosExitCritSec();3423 //DosExitCritSec(); 3420 3424 } 3421 3425 else if (*dcd->directory) {
Note:
See TracChangeset
for help on using the changeset viewer.