ssld: take inbuf/outbuf out of global scope, since its unnecessary
This commit is contained in:
parent
4952e40b7e
commit
6cd1aca7f1
1 changed files with 6 additions and 5 deletions
11
ssld/ssld.c
11
ssld/ssld.c
|
@ -51,11 +51,6 @@ uint32_to_buf(uint8_t *buf, uint32_t x)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char inbuf[READBUF_SIZE];
|
|
||||||
#ifdef HAVE_LIBZ
|
|
||||||
static char outbuf[READBUF_SIZE];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct _mod_ctl_buf
|
typedef struct _mod_ctl_buf
|
||||||
{
|
{
|
||||||
rb_dlink_node node;
|
rb_dlink_node node;
|
||||||
|
@ -394,6 +389,7 @@ mod_cmd_write_queue(mod_ctl_t * ctl, const void *data, size_t len)
|
||||||
static void
|
static void
|
||||||
common_zlib_deflate(conn_t * conn, void *buf, size_t len)
|
common_zlib_deflate(conn_t * conn, void *buf, size_t len)
|
||||||
{
|
{
|
||||||
|
char outbuf[READBUF_SIZE];
|
||||||
int ret, have;
|
int ret, have;
|
||||||
z_stream *outstream = &((zlib_stream_t *) conn->stream)->outstream;
|
z_stream *outstream = &((zlib_stream_t *) conn->stream)->outstream;
|
||||||
outstream->next_in = buf;
|
outstream->next_in = buf;
|
||||||
|
@ -427,6 +423,7 @@ common_zlib_deflate(conn_t * conn, void *buf, size_t len)
|
||||||
static void
|
static void
|
||||||
common_zlib_inflate(conn_t * conn, void *buf, size_t len)
|
common_zlib_inflate(conn_t * conn, void *buf, size_t len)
|
||||||
{
|
{
|
||||||
|
char outbuf[READBUF_SIZE];
|
||||||
int ret, have = 0;
|
int ret, have = 0;
|
||||||
((zlib_stream_t *) conn->stream)->instream.next_in = buf;
|
((zlib_stream_t *) conn->stream)->instream.next_in = buf;
|
||||||
((zlib_stream_t *) conn->stream)->instream.avail_in = len;
|
((zlib_stream_t *) conn->stream)->instream.avail_in = len;
|
||||||
|
@ -483,6 +480,7 @@ plain_check_cork(conn_t * conn)
|
||||||
static void
|
static void
|
||||||
conn_plain_read_cb(rb_fde_t *fd, void *data)
|
conn_plain_read_cb(rb_fde_t *fd, void *data)
|
||||||
{
|
{
|
||||||
|
char inbuf[READBUF_SIZE];
|
||||||
conn_t *conn = data;
|
conn_t *conn = data;
|
||||||
int length = 0;
|
int length = 0;
|
||||||
if(conn == NULL)
|
if(conn == NULL)
|
||||||
|
@ -531,6 +529,7 @@ conn_plain_read_cb(rb_fde_t *fd, void *data)
|
||||||
static void
|
static void
|
||||||
conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data)
|
conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data)
|
||||||
{
|
{
|
||||||
|
char inbuf[READBUF_SIZE];
|
||||||
conn_t *conn = data;
|
conn_t *conn = data;
|
||||||
int length = 0;
|
int length = 0;
|
||||||
|
|
||||||
|
@ -559,6 +558,7 @@ conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data)
|
||||||
static void
|
static void
|
||||||
conn_mod_read_cb(rb_fde_t *fd, void *data)
|
conn_mod_read_cb(rb_fde_t *fd, void *data)
|
||||||
{
|
{
|
||||||
|
char inbuf[READBUF_SIZE];
|
||||||
conn_t *conn = data;
|
conn_t *conn = data;
|
||||||
const char *err = remote_closed;
|
const char *err = remote_closed;
|
||||||
int length;
|
int length;
|
||||||
|
@ -1152,6 +1152,7 @@ mod_write_ctl(rb_fde_t *F, void *data)
|
||||||
static void
|
static void
|
||||||
read_pipe_ctl(rb_fde_t *F, void *data)
|
read_pipe_ctl(rb_fde_t *F, void *data)
|
||||||
{
|
{
|
||||||
|
char inbuf[READBUF_SIZE];
|
||||||
int retlen;
|
int retlen;
|
||||||
while((retlen = rb_read(F, inbuf, sizeof(inbuf))) > 0)
|
while((retlen = rb_read(F, inbuf, sizeof(inbuf))) > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue