Ignore:
Timestamp:
Apr 16, 2002, 8:27:19 AM (23 years ago)
Author:
umoeller
Message:

Misc changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/wphandle.c

    r142 r154  
    852852 *
    853853 *@@added V0.9.16 (2001-10-02) [umoeller]
     854 *@@changed V0.9.19 (2002-04-14) [umoeller]: fixed wrong error for parent handles
    854855 */
    855856
     
    857858                          USHORT usHandle,         // in: handle to search for
    858859                          PXSTRING pstrFilename,   // in/out: filename
     860                          ULONG ulLevel,           // in: recursion level (initially 0)
    859861                          PNODE *ppNode)           // out: node found (ptr can be NULL)
    860862{
     
    871873            // node has parent:
    872874            // recurse first
    873             if (arc = ComposeThis(pHandlesBuf,
    874                                   pNode->usParentHandle,
    875                                   pstrFilename,
    876                                   ppNode))
    877             {
    878                 if (arc == ERROR_INVALID_HANDLE)
    879                     // parent handle not found:
    880                     arc = ERROR_WPH_INVALID_PARENT_HANDLE;
    881                 // else leave the APIRET, this might be dangerous
    882             }
    883             else
     875            if (!(arc = ComposeThis(pHandlesBuf,
     876                                    pNode->usParentHandle,
     877                                    pstrFilename,
     878                                    ulLevel + 1,
     879                                    ppNode)))
    884880            {
    885881                // no error:
     
    893889    }
    894890    else
    895         arc = ERROR_INVALID_HANDLE;
     891        // handle not found:
     892        if (ulLevel == 0)       // V0.9.19 (2002-04-14) [umoeller]
     893            arc = ERROR_INVALID_HANDLE;
     894        else
     895            arc = ERROR_WPH_INVALID_PARENT_HANDLE;
    896896
    897897    if (!arc)
     
    953953                                        usHandle,
    954954                                        &str,
     955                                        0,      // initial recursion level
    955956                                        ppNode)))
    956957                    if (str.ulLength > cbFilename - 1)
Note: See TracChangeset for help on using the changeset viewer.