Remove g_error_fd and _error_fd/buffer/pos/write

This commit is contained in:
Brendan Shanks 2018-07-30 22:13:58 -07:00
parent 6ad279e3c8
commit c791d602bf
3 changed files with 0 additions and 20 deletions

View File

@ -9,10 +9,8 @@
#include "lsh_types.h"
#include "lsh.h"
#include "exception.h"
#define CONSOLEBUFSIZE 16384
#define ERROR_BUF_SIZE 512
typedef struct lshcontext {
int _port; // for BetterTelnet's networking
@ -43,11 +41,6 @@ typedef struct lshcontext {
int _trace_flag;
int _debug_flag;
int _error_fd;
UINT8 _error_buffer[ERROR_BUF_SIZE];
UINT32 _error_pos;
const struct exception *(*_error_write)(int fd, UINT32 length, const UINT8 *data);
int _tracing;
int _verbosing;
int _debugging;
@ -73,11 +66,6 @@ extern pthread_key_t ssh2threadkey;
#define trace_flag (((lshcontext *)pthread_getspecific(ssh2threadkey))->_trace_flag)
#define debug_flag (((lshcontext *)pthread_getspecific(ssh2threadkey))->_debug_flag)
#define error_fd (((lshcontext *)pthread_getspecific(ssh2threadkey))->_error_fd)
#define error_buffer (((lshcontext *)pthread_getspecific(ssh2threadkey))->_error_buffer)
#define error_pos (((lshcontext *)pthread_getspecific(ssh2threadkey))->_error_pos)
#define error_write (((lshcontext *)pthread_getspecific(ssh2threadkey))->_error_write)
#define tracing (((lshcontext *)pthread_getspecific(ssh2threadkey))->_tracing)
#define verbosing (((lshcontext *)pthread_getspecific(ssh2threadkey))->_verbosing)
#define debugging (((lshcontext *)pthread_getspecific(ssh2threadkey))->_debugging)

View File

@ -76,7 +76,6 @@ void ssh2_doevent(long sleepTime);
#endif
extern pthread_key_t ssh2threadkey;
extern int g_error_fd;
/*
* ssh2_init
@ -93,7 +92,6 @@ void ssh2_init()
gethostid();
/*GUSISetupConsole();*/
g_error_fd = open("dev:ttyerr", O_WRONLY );
sGUSISetup = true;
}

View File

@ -131,8 +131,6 @@ void ssh_wresize(struct WindRec* w);
/* true if we log werror/trace... to stdio, false => log to syslog */
Boolean gLogStdIO = 0;
int g_error_fd = -1;
pthread_key_t ssh2threadkey = NULL;
char homepath[256];
@ -1027,10 +1025,6 @@ void init_context(lshcontext *context, short port)
context->_verbose_flag = 0;
context->_trace_flag = 0;
context->_debug_flag = 0;
/*context->_error_fd = STDERR_FILENO;*/
context->_error_fd = g_error_fd;
context->_error_pos = 0;
//context->_error_write = write_raw;
context->_tracing = 0;
context->_verbosing = 0;
context->_debugging = 0;