mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[NETSH] Call a contexts connect function on a context change
This commit is contained in:
@@ -947,6 +947,7 @@ RegisterContext(
|
||||
{
|
||||
pContext->pfnCommitFn = pChildContext->pfnCommitFn;
|
||||
pContext->pfnDumpFn = pChildContext->pfnDumpFn;
|
||||
pContext->pfnConnectFn = pChildContext->pfnConnectFn;
|
||||
pContext->ulPriority = (pChildContext->dwFlags & CMD_FLAG_PRIORITY) ?
|
||||
pChildContext->ulPriority : DEFAULT_CONTEXT_PRIORITY;
|
||||
|
||||
|
||||
@@ -276,6 +276,8 @@ InterpretCommand(
|
||||
{
|
||||
DPRINT("Set current context\n");
|
||||
pCurrentContext = pTempSubContext;
|
||||
if (pCurrentContext->pfnConnectFn)
|
||||
dwError = pCurrentContext->pfnConnectFn(pszMachine);
|
||||
State = STATE_DONE;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ typedef struct _CONTEXT_ENTRY
|
||||
ULONG ulPriority;
|
||||
PNS_CONTEXT_COMMIT_FN pfnCommitFn;
|
||||
PNS_CONTEXT_DUMP_FN pfnDumpFn;
|
||||
PNS_CONTEXT_CONNECT_FN pfnConnectFn;
|
||||
|
||||
PCOMMAND_ENTRY pCommandListHead;
|
||||
PCOMMAND_ENTRY pCommandListTail;
|
||||
|
||||
Reference in New Issue
Block a user