1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Merge with git+ssh://pasky.or.cz/srv/git/elinks.git

This commit is contained in:
witekfl 2006-02-02 18:16:21 +01:00 committed by
commit 8448472dcc

View File

@ -63,6 +63,11 @@ struct module fsp_protocol_module = struct_module(
);
/* FSP synchronous connection management: */
/* FIXME: Although it is probably not so much an issue, check if writes to
* stdout fails for directory listing like we do for file fetching. */
static void
fsp_error(unsigned char *error)
{
@ -201,7 +206,8 @@ do_fsp(struct connection *conn)
fclose(stderr);
while ((r = fsp_fread(buf, 1, READ_SIZE, file)) > 0)
fwrite(buf, 1, r, stdout);
if (safe_write(STDOUT_FILENO, buf, r) <= 0)
break;
fsp_fclose(file);
fsp_close_session(ses);
@ -209,6 +215,11 @@ do_fsp(struct connection *conn)
}
}
#undef READ_SIZE
/* FSP asynchronous connection management: */
static void
fsp_got_data(struct socket *socket, struct read_buffer *rb)
{
@ -271,8 +282,6 @@ fsp_got_header(struct socket *socket, struct read_buffer *rb)
read_from_socket(conn->data_socket, buf, S_CONN, fsp_got_data);
}
#undef READ_SIZE
void
fsp_protocol_handler(struct connection *conn)