mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
read_special: reorganization of code.
This commit is contained in:
parent
b9c409c3b9
commit
fbc51b3991
@ -210,10 +210,6 @@ read_special(struct connection *conn, int fd)
|
|||||||
struct read_buffer *rb;
|
struct read_buffer *rb;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
if (!init_http_connection_info(conn, 1, 0, 1)) {
|
|
||||||
abort_connection(conn, S_OUT_OF_MEM);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isatty(fd)) {
|
if (isatty(fd)) {
|
||||||
abort_connection(conn, S_OK);
|
abort_connection(conn, S_OK);
|
||||||
@ -237,12 +233,17 @@ read_special(struct connection *conn, int fd)
|
|||||||
conn->popen = 1;
|
conn->popen = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conn->socket->fd = fd;
|
||||||
if (fstat(fd, &sb)) {
|
if (fstat(fd, &sb)) {
|
||||||
abort_connection(conn, -errno);
|
abort_connection(conn, -errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
conn->socket->fd = fd;
|
if (!init_http_connection_info(conn, 1, 0, 1)) {
|
||||||
|
abort_connection(conn, S_OUT_OF_MEM);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
rb = alloc_read_buffer(conn->socket);
|
rb = alloc_read_buffer(conn->socket);
|
||||||
if (!rb) {
|
if (!rb) {
|
||||||
abort_connection(conn, S_OUT_OF_MEM);
|
abort_connection(conn, S_OUT_OF_MEM);
|
||||||
|
Loading…
Reference in New Issue
Block a user