if (FAILED(methodExec(wmi,*session, L"RemoveValue", inMethodInst, &outMethodInst)))
goto methodexecfailed;
- if (outMethodInst==NULL)
- goto sessionExec;
outMethodInst->Release();
err=0;
+ inMethodInst->Release();
+ VariantClear(&vpath);
+ return err;
methodexecfailed:
+ OutputDebugString(__FUNCTION__ " MethodExecFailed");
methodputfailed:
+ OutputDebugString(__FUNCTION__ " MethodPutFailed");
inMethodInst->Release();
sessionstart:
+ OutputDebugString(__FUNCTION__ " SessionStartFailed");
VariantClear(&vpath);
sessionExec:
+ OutputDebugString(__FUNCTION__ " SessionExecFailed");
setvpath:
+ OutputDebugString(__FUNCTION__ " SetVpathFailed");
return err;
}
0,
NULL);
OutputDebugString((LPTSTR)lpMsgBuf);
+ XsLog("%s failed: %s (%x)", func, lpMsgBuf, err);
XenstorePrintf("control/error", "%s failed: %s (%x)", func, lpMsgBuf, err);
LocalFree(lpMsgBuf);
}
}
if (fail) {
XsLog("Resetting");
- ReportEvent(eventLog, EVENTLOG_SUCCESS, 0, EVENT_XENUSER_UNEXPECTED, NULL, 0, 0,
- NULL, NULL);
+ ReportEvent(eventLog, EVENTLOG_SUCCESS, 0, EVENT_XENUSER_UNEXPECTED, NULL, 0, 0,
+ NULL, NULL);
break;
}
}