Cygwin: FIFO: fix indentation

This commit is contained in:
Ken Brown 2020-08-03 09:43:36 -04:00
parent 0fda55133a
commit 55b93b27d6
1 changed files with 48 additions and 48 deletions

View File

@ -619,56 +619,56 @@ owner_listen:
/* select.cc:peek_fifo has already recorded a connection. */ /* select.cc:peek_fifo has already recorded a connection. */
; ;
else else
{
switch (status)
{ {
case STATUS_SUCCESS: switch (status)
case STATUS_PIPE_CONNECTED: {
record_connection (fc); case STATUS_SUCCESS:
break; case STATUS_PIPE_CONNECTED:
case STATUS_PIPE_CLOSING: record_connection (fc);
debug_printf ("NtFsControlFile got STATUS_PIPE_CLOSING..."); break;
/* Maybe a writer already connected, wrote, and closed. case STATUS_PIPE_CLOSING:
Just query the O/S. */ debug_printf ("NtFsControlFile got STATUS_PIPE_CLOSING...");
fc.query_and_set_state (); /* Maybe a writer already connected, wrote, and closed.
debug_printf ("...O/S reports state %d", fc.get_state ()); Just query the O/S. */
record_connection (fc, false); fc.query_and_set_state ();
break; debug_printf ("...O/S reports state %d", fc.get_state ());
case STATUS_THREAD_IS_TERMINATING: record_connection (fc, false);
case STATUS_WAIT_1: break;
/* Try to connect a bogus client. Otherwise fc is still case STATUS_THREAD_IS_TERMINATING:
listening, and the next connection might not get recorded. */ case STATUS_WAIT_1:
status1 = open_pipe (ph); /* Try to connect a bogus client. Otherwise fc is still
WaitForSingleObject (conn_evt, INFINITE); listening, and the next connection might not get recorded. */
if (NT_SUCCESS (status1)) status1 = open_pipe (ph);
/* Bogus cilent connected. */ WaitForSingleObject (conn_evt, INFINITE);
delete_client_handler (nhandlers - 1); if (NT_SUCCESS (status1))
else /* Bogus cilent connected. */
/* Did a real client connect? */ delete_client_handler (nhandlers - 1);
switch (io.Status) else
{ /* Did a real client connect? */
case STATUS_SUCCESS: switch (io.Status)
case STATUS_PIPE_CONNECTED: {
record_connection (fc); case STATUS_SUCCESS:
break; case STATUS_PIPE_CONNECTED:
case STATUS_PIPE_CLOSING: record_connection (fc);
debug_printf ("got STATUS_PIPE_CLOSING when trying to connect bogus client..."); break;
fc.query_and_set_state (); case STATUS_PIPE_CLOSING:
debug_printf ("...O/S reports state %d", fc.get_state ()); debug_printf ("got STATUS_PIPE_CLOSING when trying to connect bogus client...");
record_connection (fc, false); fc.query_and_set_state ();
break; debug_printf ("...O/S reports state %d", fc.get_state ());
default: record_connection (fc, false);
debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); break;
fc.set_state (fc_error); default:
break; debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status);
} fc.set_state (fc_error);
break; break;
default: }
debug_printf ("NtFsControlFile got unexpected status %y", status); break;
fc.set_state (fc_error); default:
break; debug_printf ("NtFsControlFile got unexpected status %y", status);
fc.set_state (fc_error);
break;
}
} }
}
if (ph) if (ph)
NtClose (ph); NtClose (ph);
if (update) if (update)