Dmitry Timoshkov : taskschd: Add a check for the task namespace.

Alexandre Julliard julliard at winehq.org
Tue Feb 25 16:58:15 CST 2014


Module: wine
Branch: master
Commit: d2fc6b3145e41d05a81692eb0939bbadf694f5e7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d2fc6b3145e41d05a81692eb0939bbadf694f5e7

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Tue Feb 25 12:22:25 2014 +0900

taskschd: Add a check for the task namespace.

---

 dlls/taskschd/task.c            |    7 ++++++-
 dlls/taskschd/tests/scheduler.c |    1 -
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c
index eb42d65..1288314 100644
--- a/dlls/taskschd/task.c
+++ b/dlls/taskschd/task.c
@@ -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)
diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c
index 8187214..48d16dd 100644
--- a/dlls/taskschd/tests/scheduler.c
+++ b/dlls/taskschd/tests/scheduler.c
@@ -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]));




More information about the wine-cvs mailing list