Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4c08276e
Commit
4c08276e
authored
Feb 25, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Return appropriate error code for a malformed XML.
parent
39f0b276
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
task.c
dlls/taskschd/task.c
+4
-4
scheduler.c
dlls/taskschd/tests/scheduler.c
+9
-2
No files found.
dlls/taskschd/task.c
View file @
4c08276e
...
...
@@ -1916,7 +1916,7 @@ static HRESULT read_settings(IXmlReader *reader, ITaskSettings *taskset)
}
WARN
(
"Settings was not terminated
\n
"
);
return
E_FAI
L
;
return
SCHED_E_MALFORMEDXM
L
;
}
static
HRESULT
read_registration_info
(
IXmlReader
*
reader
,
IRegistrationInfo
*
info
)
...
...
@@ -1981,7 +1981,7 @@ static HRESULT read_registration_info(IXmlReader *reader, IRegistrationInfo *inf
}
WARN
(
"RegistrationInfo was not terminated
\n
"
);
return
E_FAI
L
;
return
SCHED_E_MALFORMEDXM
L
;
}
static
HRESULT
read_task_attributes
(
IXmlReader
*
reader
,
ITaskDefinition
*
taskdef
)
...
...
@@ -2119,7 +2119,7 @@ static HRESULT read_task(IXmlReader *reader, ITaskDefinition *taskdef)
}
WARN
(
"Task was not terminated
\n
"
);
return
E_FAI
L
;
return
SCHED_E_MALFORMEDXM
L
;
}
static
HRESULT
read_xml
(
IXmlReader
*
reader
,
ITaskDefinition
*
taskdef
)
...
...
@@ -2165,7 +2165,7 @@ static HRESULT read_xml(IXmlReader *reader, ITaskDefinition *taskdef)
}
WARN
(
"Task definition was not found
\n
"
);
return
E_FAI
L
;
return
SCHED_E_MALFORMEDXM
L
;
}
static
HRESULT
WINAPI
TaskDefinition_put_XmlText
(
ITaskDefinition
*
iface
,
BSTR
xml
)
...
...
dlls/taskschd/tests/scheduler.c
View file @
4c08276e
...
...
@@ -1153,8 +1153,12 @@ static void test_TaskDefinition(void)
static
const
char
xml6
[]
=
"<Task xmlns=
\"
http://schemas.microsoft.com/windows/2004/02/mit/task
\"
>
\n
"
" <RegistrationInfo/>
\n
"
" <Settings/>
\n
"
" <Actions>
\n
"
" <Exec>
\n
"
" <Command>
\"
task1.exe
\"
</Command>
\n
"
" </Exec>
\n
"
" </Actions>
\n
"
" <Settings>
\n
"
"</Task>
\n
"
;
static
const
char
xml7
[]
=
"<Task xmlns=
\"
http://schemas.microsoft.com/windows/2004/02/mit/task
\"
>
\n
"
...
...
@@ -1241,13 +1245,16 @@ todo_wine
MultiByteToWideChar
(
CP_ACP
,
0
,
xml6
,
-
1
,
xmlW
,
sizeof
(
xmlW
)
/
sizeof
(
xmlW
[
0
]));
hr
=
ITaskDefinition_put_XmlText
(
taskdef
,
xmlW
);
todo_wine
ok
(
hr
==
SCHED_E_MALFORMEDXML
,
"expected SCHED_E_MALFORMEDXML, got %#x
\n
"
,
hr
);
MultiByteToWideChar
(
CP_ACP
,
0
,
xml7
,
-
1
,
xmlW
,
sizeof
(
xmlW
)
/
sizeof
(
xmlW
[
0
]));
hr
=
ITaskDefinition_put_XmlText
(
taskdef
,
xmlW
);
ok
(
hr
==
SCHED_E_INVALIDVALUE
,
"expected SCHED_E_INVALIDVALUE, got %#x
\n
"
,
hr
);
xmlW
[
0
]
=
0
;
hr
=
ITaskDefinition_put_XmlText
(
taskdef
,
xmlW
);
ok
(
hr
==
SCHED_E_MALFORMEDXML
,
"expected SCHED_E_MALFORMEDXML, got %#x
\n
"
,
hr
);
ITaskDefinition_Release
(
taskdef
);
ITaskService_Release
(
service
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment