This should simplify subsequent patches that allow variable-sized
output buffers for filters/receivers.
/** the client task structure */
struct task task;
/** the buffer used for handshake and receiving */
- char buf[CLIENT_BUFSIZE];
+ char *buf;
/** number of bytes loaded in \p buf */
size_t loaded;
/** non-zero if the pre_select hook added \p fd to the read fd set */
disable_crypt(ct->fd);
close(ct->fd);
}
+ free(ct->buf);
free(ct->user);
free(ct->config_file);
free(ct->key_file);
int ret;
struct client_task *ct = para_calloc(sizeof(struct client_task));
+ ct->buf = para_malloc(CLIENT_BUFSIZE);
*ct_ptr = ct;
ct->fd = -1;
ret = -E_CLIENT_SYNTAX;