server: Fix handling of STATUS_ALERTED in get_next_console_request.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-12-02 20:06:11 +01:00 committed by Alexandre Julliard
parent 42f90354ba
commit 574ced0dc6
2 changed files with 15 additions and 1 deletions

View File

@ -268,6 +268,8 @@ static void testWriteSimple(HANDLE hCon)
const char* mytest = "abcdefg";
int mylen = strlen(mytest);
COORD c = {0, 0};
DWORD len;
BOOL ret;
simple_write_console(hCon, mytest);
@ -278,6 +280,18 @@ static void testWriteSimple(HANDLE hCon)
okCURSOR(hCon, c);
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
ret = WriteFile(hCon, mytest, mylen, &len, NULL);
ok(ret, "WriteFile failed: %u\n", GetLastError());
ok(len == mylen, "unexpected len = %u\n", len);
for (c.X = 0; c.X < 2 * mylen; c.X++)
{
okCHAR(hCon, c, mytest[c.X % mylen], TEST_ATTRIB);
}
okCURSOR(hCon, c);
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
}
static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize)

View File

@ -1520,7 +1520,6 @@ DECL_HANDLER(get_next_console_request)
if ((iosb->out_data = memdup( get_req_data(), iosb->out_size )))
{
iosb->result = iosb->out_size;
status = STATUS_ALERTED;
}
else if (!status)
{
@ -1528,6 +1527,7 @@ DECL_HANDLER(get_next_console_request)
iosb->out_size = 0;
}
}
if (iosb->result) status = STATUS_ALERTED;
}
else
{