8000 1.6.11-0 by Jodie111 · Pull Request #730 · microsoft/omi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

1.6.11-0 #730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions Unix/disp/disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,7 @@ static MI_Result _HandleGetClassReq(
_In_ GetClassReq* req)
{
MI_Result r;
const ProvRegEntry* reg;
ProvRegEntry freg;
ProvRegEntry* reg;
ProvRegPosition pos;

/* Validate input parameters */
Expand All @@ -616,8 +615,6 @@ static MI_Result _HandleGetClassReq(
if(Tcscmp(req->className, PAL_T("*")) == 0)
return MI_RESULT_INVALID_CLASS;

memset( &freg, 0, sizeof(freg) );

// Find a provider for this class.
reg = ProvReg_FindProviderForClass(&self->provreg, req->nameSpace,
req->className, &r );
Expand Down Expand Up @@ -647,9 +644,17 @@ static MI_Result _HandleGetClassReq(
if (MI_RESULT_OK == r)
{
DEBUG_ASSERT(pos.start != NULL);
MapRegPositionValuesToRegEntry(&freg, &pos);
freg.nameSpace = req->nameSpace;
freg.nameSpaceHash = Hash(req->nameSpace);
reg = (ProvRegEntry*)Batch_GetClear(req->base.base.batch, sizeof(ProvRegEntry));
if(reg)
{
MapRegPositionValuesToRegEntry(reg, &pos);
reg->nameSpace = req->nameSpace;
reg->nameSpaceHash = Hash(req->nameSpace);
}
else
{
r = MI_RESULT_FAILED;
}
}
}

Expand All @@ -661,13 +666,9 @@ static MI_Result _HandleGetClassReq(
goto sendErrorBack;
}
}
else
{
freg = *reg;
}

// Send the request to provider manager.
r = AgentMgr_HandleRequest(&self->agentmgr, interactionParams, &freg);
r = AgentMgr_HandleRequest(&self->agentmgr, interactionParams, reg);

if (r != MI_RESULT_OK)
{
Expand All @@ -680,6 +681,7 @@ static MI_Result _HandleGetClassReq(

sendErrorBack:
// Just abort creating any interaction at all

return r;
}

Expand Down
0