Changeset 1874 for trunk/dll/dircnrs.c


Ignore:
Timestamp:
Sep 27, 2015, 7:20:10 PM (10 years ago)
Author:
Gregg Young
Message:

DosSleep times in WaitFleshWorkListEmpty set by caller; TOPDIR code calls WaitFleshWorkListEmpty before ShowCnrRecord and now actually exists for directory containers in tree view. These calls are made from the object windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dircnrs.c

    r1873 r1874  
    9393                duplicate subdirectory name caused by running Stubby in worker threads.
    9494  07 Aug 15 SHL Rework to use AddFleshWorkRequest rather than direct calls to Stubby/Flesh/Unflesh
     95  26 Sep 15 GKY Add code so case UM_TOPDIR actually exists put it in the object window so it
     96                can call WaitFleshWorkListEmpty while avoiding thread 1
     97  27 Sep 15 GKY DosSleep times in WaitFleshWorkListEmpty set by caller
    9598
    9699***********************************************************************/
     
    856859    return 0;
    857860
     861  case UM_TOPDIR:
     862    if (mp1) {
     863      dcd = WinQueryWindowPtr(hwnd, QWL_USER);
     864      if (dcd) {
     865        PCNRITEM pci = (PCNRITEM) mp1;
     866        WaitFleshWorkListEmpty(pci->pszFileName, 240L);
     867        ShowCnrRecord(dcd->hwndCnr, (PMINIRECORDCORE) pci);
     868      }
     869    }
     870    return 0;
     871
    858872  case UM_RESCAN:
    859873    // populate container
     
    28622876                     driveserial[toupper(*pci->pszFileName) - 'A'] !=
    28632877                     volser.serial)) {
    2864                   // 2015-08-07 SHL FIXME to wait for Flesh to finish before PostMsg
     2878                  // 2015-08-07 SHL FIXME to wait for Flesh to finish before PostMsg
     2879                  // 2015-09-26 GKY Waits (WaitFleshWorkListEmpty) in object window
     2880                  DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
    28652881                  if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && AddFleshWorkRequest(hwnd, pci, eFlesh) &&
    2866                       !dcd->suspendview && fTopDir  && !fSwitchTreeOnDirChg) {
    2867                     PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
    2868                     //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2882                      !dcd->suspendview && fTopDir) {
     2883                    PostMsg(dcd->hwndObject, UM_TOPDIR, MPFROMP(pci), MPVOID);
     2884                    DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
    28692885                  }
    28702886                }
     
    28722888              }
    28732889            }
    2874             else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) {
     2890            else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) {
     2891              DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
    28752892              if (AddFleshWorkRequest(hwnd, pci, eFlesh) && !dcd->suspendview &&
    2876                   fTopDir && !fSwitchTreeOnDirChg) {
    2877                 // 2015-08-07 SHL FIXME to wait for Flesh to finish before PostMsg
    2878                 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
    2879                 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2893                  fTopDir) {
     2894                // 2015-08-07 SHL FIXME to wait for Flesh to finish before PostMsg
     2895                // 2015-09-26 GKY Waits (WaitFleshWorkListEmpty) in object window
     2896                PostMsg(dcd->hwndObject, UM_TOPDIR, MPFROMP(pci), MPVOID);
     2897                DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
    28802898              }
    28812899            }
Note: See TracChangeset for help on using the changeset viewer.