diff --git a/base/applications/network/netsh/context.c b/base/applications/network/netsh/context.c index aaf735cca4a..a51f1c45a0f 100644 --- a/base/applications/network/netsh/context.c +++ b/base/applications/network/netsh/context.c @@ -939,12 +939,18 @@ RegisterContext( pParentContext = pRootContext; if (pHelper != NULL) { - pParentContext = FindContextByGuid(&pHelper->ParentHelperGuid); + //pParentContext = FindContextByGuid(&pHelper->ParentHelperGuid); + if (pHelper->pParentHelper) + pParentContext = FindContextByGuid(&pHelper->pParentHelper->Attributes.guidHelper); + else + pParentContext = NULL; DPRINT("pParentContext %p\n", pParentContext); if (pParentContext == NULL) pParentContext = pRootContext; } + // TODO: Save pChildContext->dwVersion; + pContext = AddContext(pParentContext, pChildContext->pwszContext, (GUID*)&pChildContext->guidHelper); if (pContext != NULL) { @@ -999,5 +1005,4 @@ VOID CleanupContext(VOID) { /* Delete the context stack */ - } diff --git a/base/applications/network/netsh/helper.c b/base/applications/network/netsh/helper.c index ca3947fc2a5..dbfffeb0b04 100644 --- a/base/applications/network/netsh/helper.c +++ b/base/applications/network/netsh/helper.c @@ -38,7 +38,11 @@ StartHelpers( { if (pHelper->Attributes.pfnStart) { - dwError = pHelper->Attributes.pfnStart(NULL, 0); + //dwError = pHelper->Attributes.pfnStart(&pHelper->ParentHelperGuid, 0); + if (pHelper->pParentHelper) + dwError = pHelper->Attributes.pfnStart(&pHelper->pParentHelper->Attributes.guidHelper, pHelper->pParentHelper->Attributes.dwVersion); + else + dwError = pHelper->Attributes.pfnStart(NULL, 0); if (dwError == ERROR_SUCCESS) pHelper->bStarted = TRUE; } @@ -415,6 +419,7 @@ RegisterHelper( if (pguidParentHelper == NULL) { + pHelper->pParentHelper = NULL; if ((pHelperListHead == NULL) && (pHelperListTail == NULL)) { pHelperListHead = pHelper; @@ -429,13 +434,15 @@ RegisterHelper( } else { - CopyMemory(&pHelper->ParentHelperGuid, pguidParentHelper, sizeof(GUID)); + // TODO: pHelperAttributes->dwVersion + //CopyMemory(&pHelper->ParentHelperGuid, pguidParentHelper, sizeof(GUID)); pParentHelper = FindHelper(pguidParentHelper, pHelperListHead); if (pParentHelper == NULL) { DPRINT("Parent helper %lx not found!\n", pguidParentHelper->Data1); return ERROR_INVALID_PARAMETER; } + pHelper->pParentHelper = pParentHelper; if ((pParentHelper->pSubHelperHead == NULL) && (pParentHelper->pSubHelperTail == NULL)) { diff --git a/base/applications/network/netsh/precomp.h b/base/applications/network/netsh/precomp.h index a93d01a95d0..d72ba975156 100644 --- a/base/applications/network/netsh/precomp.h +++ b/base/applications/network/netsh/precomp.h @@ -58,8 +58,9 @@ typedef struct _HELPER_ENTRY struct _HELPER_ENTRY *pPrev; struct _HELPER_ENTRY *pNext; + struct _HELPER_ENTRY *pParentHelper; NS_HELPER_ATTRIBUTES Attributes; - GUID ParentHelperGuid; + // GUID ParentHelperGuid; PDLL_LIST_ENTRY pDllEntry; BOOL bStarted;