fifo_client_handler fc_handler[MAX_CLIENTS];
int nhandlers, nconnected;
af_unix_spinlock_t _fifo_client_lock;
- bool _duplexer;
+ bool reader, writer, duplexer;
bool __reg2 wait (HANDLE);
NTSTATUS npfs_handle (HANDLE &);
HANDLE create_pipe_instance (bool);
fhandler_fifo::fhandler_fifo ():
fhandler_base (), read_ready (NULL), write_ready (NULL),
listen_client_thr (NULL), lct_termination_evt (NULL), nhandlers (0),
- nconnected (0), _duplexer (false)
+ nconnected (0), reader (false), writer (false), duplexer (false)
{
pipe_name_buf[0] = L'\0';
need_fork_fixup (true);
}
access = GENERIC_READ | FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES
| SYNCHRONIZE;
- if (first && _duplexer)
+ if (first && duplexer)
access |= GENERIC_WRITE;
sharing = FILE_SHARE_READ | FILE_SHARE_WRITE;
hattr = OBJ_INHERIT;
error_errno_set,
error_set_errno
} res;
- bool reader, writer, duplexer;
/* Determine what we're doing with this fhandler: reading, writing, both */
switch (flags & O_ACCMODE)
{
case O_RDONLY:
reader = true;
- writer = false;
- duplexer = false;
break;
case O_WRONLY:
writer = true;
- reader = false;
- duplexer = false;
break;
case O_RDWR:
reader = true;
- writer = false;
- duplexer = _duplexer = true;
+ duplexer = true;
break;
default:
set_errno (EINVAL);
fifo_client_unlock ();
goto errout;
}
- else if (nread == 0 && (!_duplexer || i > 0))
+ else if (nread == 0 && (!duplexer || i > 0))
/* Client has disconnected. */
{
fc_handler[i].state = fc_invalid;