diff options
author | nicm <nicm> | 2020-05-26 08:41:47 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-26 08:41:47 +0000 |
commit | ea610a311902b56c6466d79332592ab7f3dc501a (patch) | |
tree | 5105e83b6490c4c95508648bc94ffa2f654dee66 /file.c | |
parent | 6f03e49e68dfe0d9c0c7d49079c4383b26aca916 (diff) | |
download | rtmux-ea610a311902b56c6466d79332592ab7f3dc501a.tar.gz rtmux-ea610a311902b56c6466d79332592ab7f3dc501a.tar.bz2 rtmux-ea610a311902b56c6466d79332592ab7f3dc501a.zip |
Pass the stdout file descriptor from the client as well as stdin and use
them for control clients directly instead of passing everything via the
client.
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -242,7 +242,9 @@ file_write(struct client *c, const char *path, int flags, const void *bdata, cf->path = xstrdup("-"); fd = STDOUT_FILENO; - if (c == NULL || c->flags & CLIENT_ATTACHED) { + if (c == NULL || + (c->flags & CLIENT_ATTACHED) || + (c->flags & CLIENT_CONTROL)) { cf->error = EBADF; goto done; } @@ -311,7 +313,9 @@ file_read(struct client *c, const char *path, client_file_cb cb, void *cbdata) cf->path = xstrdup("-"); fd = STDIN_FILENO; - if (c == NULL || c->flags & CLIENT_ATTACHED) { + if (c == NULL || + (c->flags & CLIENT_ATTACHED) || + (c->flags & CLIENT_CONTROL)) { cf->error = EBADF; goto done; } |