Commit d2fc6b31 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

taskschd: Add a check for the task namespace.

parent 1c778d91
......@@ -1990,6 +1990,7 @@ static HRESULT read_task_attributes(IXmlReader *reader, ITaskDefinition *taskdef
ITaskSettings *taskset;
const WCHAR *name;
const WCHAR *value;
BOOL xmlns_ok = FALSE;
TRACE("\n");
......@@ -2028,7 +2029,11 @@ static HRESULT read_task_attributes(IXmlReader *reader, ITaskDefinition *taskdef
else if (!lstrcmpW(name, xmlns))
{
if (lstrcmpW(value, task_ns))
{
FIXME("unknown namespace %s\n", debugstr_w(value));
break;
}
xmlns_ok = TRUE;
}
else
FIXME("unhandled Task attribute %s\n", debugstr_w(name));
......@@ -2037,7 +2042,7 @@ static HRESULT read_task_attributes(IXmlReader *reader, ITaskDefinition *taskdef
}
ITaskSettings_Release(taskset);
return S_OK;
return xmlns_ok ? S_OK : SCHED_E_NAMESPACE;
}
static HRESULT read_task(IXmlReader *reader, ITaskDefinition *taskdef)
......
......@@ -1223,7 +1223,6 @@ static void test_TaskDefinition(void)
MultiByteToWideChar(CP_ACP, 0, xml2, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0]));
hr = ITaskDefinition_put_XmlText(taskdef, xmlW);
todo_wine
ok(hr == SCHED_E_NAMESPACE, "expected SCHED_E_NAMESPACE, got %#x\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml3, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment