Commit 574ced0d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Fix handling of STATUS_ALERTED in get_next_console_request.

parent 42f90354
......@@ -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)
......
......@@ -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
{
......
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