Commit 652a3561 authored by Deucе's avatar Deucе 👌🏾
Browse files

Replace BOOL/TRUE/FALSE with bool/true/false

There's no reason to be aggressively ancient.
parent 08f22d59
Pipeline #3504 passed with stage
in 5 minutes and 30 seconds
This diff is collapsed.
......@@ -5,6 +5,7 @@
#ifndef _BBSLIST_H_
#define _BBSLIST_H_
#include <stdbool.h>
#include <stdio.h> /* FILE * */
#include "gen_defs.h"
#include "dirwrap.h" /* MAX_PATH */
......@@ -93,7 +94,7 @@ struct bbslist {
char dldir[MAX_PATH+1];
char uldir[MAX_PATH+1];
char logfile[MAX_PATH+1];
BOOL append_logfile;
bool append_logfile;
int xfer_loglevel;
int telnet_loglevel;
int bpsrate;
......
......@@ -255,11 +255,11 @@ size_t conn_buf_wait_cond(struct conn_buffer *buf, size_t bcount, unsigned long
* Connection functions
*/
BOOL conn_connected(void)
bool conn_connected(void)
{
if(conn_api.input_thread_running == 1 && conn_api.output_thread_running == 1)
return(TRUE);
return(FALSE);
return(true);
return(false);
}
int conn_recv_upto(void *vbuffer, size_t buflen, unsigned timeout)
......@@ -544,7 +544,7 @@ connected:
nonblock=0;
ioctlsocket(sock, FIONBIO, &nonblock);
if (!socket_recvdone(sock, 0)) {
int keepalives = TRUE;
int keepalives = true;
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void*)&keepalives, sizeof(keepalives));
if (!bbs->hidepopups) {
......
......@@ -73,7 +73,7 @@ int conn_send(const void *buffer, size_t buflen, unsigned int timeout);
int conn_send_raw(const void *buffer, size_t buflen, unsigned int timeout);
int conn_connect(struct bbslist *bbs);
int conn_close(void);
BOOL conn_connected(void);
bool conn_connected(void);
size_t conn_data_waiting(void);
void conn_binary_mode_on(void);
void conn_binary_mode_off(void);
......
......@@ -25,7 +25,7 @@ extern int telnet_log_level;
// 'result' may point to either inbuf (if there were no IACs) or outbuf
// Returns the final byte count of the result
/*****************************************************************************/
size_t st_telnet_expand(const uchar* inbuf, size_t inlen, uchar* outbuf, size_t outlen, BOOL expand_cr, uchar** result)
static size_t st_telnet_expand(const uchar* inbuf, size_t inlen, uchar* outbuf, size_t outlen, bool expand_cr, uchar** result)
{
static bool last_was_lf = false;
BYTE* first_iac = (BYTE*)memchr(inbuf, TELNET_IAC, inlen);
......@@ -108,7 +108,7 @@ void *telnet_tx_parse_cb(const void *buf, size_t len, size_t *olen)
int telnet_connect(struct bbslist *bbs)
{
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
telnet_log_level = bbs->telnet_loglevel;
......
......@@ -43,7 +43,7 @@ void save_font_files(struct font_files *fonts)
if(safe_mode)
return;
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
if((inifile=fopen(inipath,"r"))!=NULL) {
ini_file=iniReadFile(inifile);
fclose(inifile);
......@@ -78,7 +78,7 @@ void save_font_files(struct font_files *fonts)
else {
uifc.helpbuf="There was an error writing the INI file.\nCheck permissions and try again.\n";
uifc.msg("Cannot write to the .ini file!");
check_exit(FALSE);
check_exit(false);
}
strListFree(&fontnames);
......@@ -96,7 +96,7 @@ struct font_files *read_font_files(int *count)
struct font_files *tmp;
*count=0;
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
if((inifile=fopen(inipath, "r"))==NULL) {
return(ret);
}
......@@ -202,7 +202,7 @@ void load_font_files(void)
}
}
/* Set default font */
setfont(default_font, FALSE, 0);
setfont(default_font, false, 0);
font_names[i]="";
}
......@@ -259,7 +259,7 @@ void font_management(void)
}
i=uifc.list(WIN_SAV|WIN_INS|WIN_INSACT|WIN_DEL|WIN_XTR|WIN_ACT,0,0,0,&cur,&bar,"Font Management",opt);
if(i==-1) {
check_exit(FALSE);
check_exit(false);
save_font_files(fonts);
free_font_files(fonts);
return;
......@@ -284,14 +284,14 @@ void font_management(void)
str[0]=0;
uifc.helpbuf="Enter the name of the font as you want it to appear in menus.";
if(uifc.input(WIN_SAV|WIN_MID,0,0,"Font Name",str,50,0)==-1) {
check_exit(FALSE);
check_exit(false);
break;
}
count++;
tmp=(struct font_files *)realloc(fonts, sizeof(struct font_files)*(count+1));
if(tmp==NULL) {
uifc.msg("realloc() failure, cannot add font.");
check_exit(FALSE);
check_exit(false);
count--;
break;
}
......@@ -316,7 +316,7 @@ void font_management(void)
opts[4][0]=0;
i=uifc.list(WIN_SAV|WIN_ACT|WIN_INS|WIN_INSACT|WIN_DEL|WIN_RHT|WIN_BOT,0,0,0,&fcur,&fbar,"Font Details",opt);
if(i==-1) {
check_exit(FALSE);
check_exit(false);
break;
}
switch(i) {
......@@ -324,7 +324,7 @@ void font_management(void)
SAFECOPY(str,fonts[cur].name);
uifc.helpbuf="Enter the name of the font as you want it to appear\nin menus.";
if (uifc.input(WIN_SAV|WIN_MID,0,0,"Font Name",str,50,K_EDIT)==-1)
check_exit(FALSE);
check_exit(false);
else {
FREE_AND_NULL(fonts[cur].name);
fonts[cur].name=strdup(str);
......@@ -361,7 +361,7 @@ void font_management(void)
if(savbuf==NULL) {
uifc.helpbuf="malloc() has failed. Available Memory is dangerously low.";
uifc.msg("malloc() failure.");
check_exit(FALSE);
check_exit(false);
continue;
}
vmem_gettext(1,2,ti.screenwidth,ti.screenheight-1,savbuf);
......@@ -371,7 +371,7 @@ void font_management(void)
*(path)=strdup(fpick.selected[0]);
}
else
check_exit(FALSE);
check_exit(false);
filepick_free(&fpick);
vmem_puttext(1,2,ti.screenwidth,ti.screenheight-1,savbuf);
}
......
......@@ -37,10 +37,10 @@ void viewscroll(void)
memcpy(scrollback,cterm->scrollback,term.width*sizeof(*scrollback)*settings.backlines);
vmem_gettext(1,1,txtinfo.screenwidth,txtinfo.screenheight,scrollback+(cterm->backpos)*cterm->width);
savscrn = savescreen();
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
drawwin();
top=cterm->backpos;
set_modepalette(palettes[COLOUR_PALETTE]);
......@@ -64,7 +64,7 @@ void viewscroll(void)
case 0:
switch(key|getch()<<8) {
case CIO_KEY_QUIT:
check_exit(TRUE);
check_exit(true);
break;
case CIO_KEY_MOUSE:
getmouse(&mevent);
......@@ -95,14 +95,14 @@ void viewscroll(void)
top+=term.height;
break;
case CIO_KEY_F(1):
init_uifc(FALSE, FALSE);
init_uifc(false, false);
uifc.helpbuf= "`Scrollback Buffer`\n\n"
"~ J ~ or ~ Up Arrow ~ Scrolls up one line\n"
"~ K ~ or ~ Down Arrow ~ Scrolls down one line\n"
"~ H ~ or ~ Page Up ~ Scrolls up one screen\n"
"~ L ~ or ~ Page Down ~ Scrolls down one screen\n";
uifc.showhelp();
check_exit(FALSE);
check_exit(false);
uifcbail();
drawwin();
break;
......@@ -164,10 +164,10 @@ int syncmenu(struct bbslist *bbs, int *speed)
gettextinfo(&txtinfo);
savscrn = savescreen();
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
if(cio_api.mode!=CIOLIB_MODE_CURSES
&& cio_api.mode!=CIOLIB_MODE_CURSES_IBM
......@@ -176,7 +176,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
}
for(ret=0;(!ret) && (!quitting);) {
init_uifc(FALSE, !(bbs->nostatus));
init_uifc(false, !(bbs->nostatus));
uifc.helpbuf= "`Online Menu`\n\n"
"`Scrollback` Allows to you to view the scrollback buffer\n"
"`Disconnect` Disconnects the current connection\n"
......@@ -199,7 +199,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&opt,NULL,"SyncTERM Online Menu",opts);
switch(i) {
case -1: /* Cancel */
check_exit(FALSE);
check_exit(false);
ret=1;
break;
case 0: /* Scrollback */
......@@ -236,7 +236,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
"In general, you will only use this option for ANSI animations.";
i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,NULL,"Output Rate",rate_names);
if (i==-1)
check_exit(FALSE);
check_exit(false);
if(i>=0)
*speed = rates[i];
}
......@@ -250,7 +250,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
"it will be displayed.";
i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,NULL,"Log Level",log_levels);
if (i==-1)
check_exit(FALSE);
check_exit(false);
if(i>=0)
log_level = j;
ret=6;
......
......@@ -2,6 +2,7 @@
/* $Id: modem.c,v 1.32 2020/06/27 08:27:39 deuce Exp $ */
#include <stdbool.h>
#include <stdlib.h>
#include "comio.h"
......@@ -22,13 +23,13 @@ void modem_input_thread(void *args)
int rd;
int buffered;
size_t buffer;
BOOL monitor_dsr=TRUE;
bool monitor_dsr=true;
SetThreadName("Modem Input");
conn_api.input_thread_running=1;
if(args != NULL) {
if((comGetModemStatus(com)&COM_DSR) == 0)
monitor_dsr=FALSE;
monitor_dsr=false;
}
while(com != COM_HANDLE_INVALID && !conn_api.terminate) {
rd=comReadBuf(com, (char *)conn_api.rd_buf, conn_api.rd_buf_size, NULL, 100);
......@@ -58,13 +59,13 @@ void modem_output_thread(void *args)
int wr;
int ret;
int sent;
BOOL monitor_dsr=TRUE;
bool monitor_dsr=true;
SetThreadName("Modem Output");
conn_api.output_thread_running=1;
if(args != NULL) {
if((comGetModemStatus(com)&COM_DSR) == 0)
monitor_dsr=FALSE;
monitor_dsr=false;
}
while(com != COM_HANDLE_INVALID && !conn_api.terminate) {
pthread_mutex_lock(&(conn_outbuf.mutex));
......@@ -140,7 +141,7 @@ int modem_connect(struct bbslist *bbs)
char respbuf[1024];
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
if(bbs->conn_type == CONN_TYPE_SERIAL || bbs->conn_type == CONN_TYPE_SERIAL_NORTS) {
if((com=comOpen(bbs->addr)) == COM_HANDLE_INVALID) {
......
......@@ -2,6 +2,7 @@
* This code handles Operation Overkill ][ terminal codes
*/
#include <stdbool.h>
#include <string.h>
#include <genwrap.h>
#include <xpbeep.h>
......@@ -1541,147 +1542,147 @@ static int incomingSoundVoc(unsigned char *codeStr) {
codeStr++;
switch(*codeStr) {
case '1':
xp_play_sample(ooii_snd_welcome, sizeof(ooii_snd_welcome), TRUE);
xp_play_sample(ooii_snd_welcome, sizeof(ooii_snd_welcome), true);
break;
case '3':
xp_play_sample(ooii_snd_countdn, sizeof(ooii_snd_countdn), FALSE);
xp_play_sample(ooii_snd_countdn, sizeof(ooii_snd_countdn), false);
/* Fallthrough */
case '2':
xp_play_sample(ooii_snd_explode, sizeof(ooii_snd_explode), TRUE);
xp_play_sample(ooii_snd_explode, sizeof(ooii_snd_explode), true);
break;
case '4':
xp_play_sample(ooii_snd_clone, sizeof(ooii_snd_clone), TRUE);
xp_play_sample(ooii_snd_clone, sizeof(ooii_snd_clone), true);
break;
case '5':
if(xp_random(2))
xp_play_sample(ooii_snd_danger1, sizeof(ooii_snd_danger1), TRUE);
xp_play_sample(ooii_snd_danger1, sizeof(ooii_snd_danger1), true);
else
xp_play_sample(ooii_snd_danger2, sizeof(ooii_snd_danger2), TRUE);
xp_play_sample(ooii_snd_danger2, sizeof(ooii_snd_danger2), true);
break;
case '6':
xp_play_sample(ooii_snd_steam, sizeof(ooii_snd_steam), TRUE);
xp_play_sample(ooii_snd_steam, sizeof(ooii_snd_steam), true);
break;
case '7':
xp_play_sample(ooii_snd_scream1, sizeof(ooii_snd_scream1), TRUE);
xp_play_sample(ooii_snd_scream1, sizeof(ooii_snd_scream1), true);
break;
case '8':
xp_play_sample(ooii_snd_watch, sizeof(ooii_snd_watch), TRUE);
xp_play_sample(ooii_snd_watch, sizeof(ooii_snd_watch), true);
break;
case '9':
xp_play_sample(ooii_snd_levelup, sizeof(ooii_snd_levelup), TRUE);
xp_play_sample(ooii_snd_levelup, sizeof(ooii_snd_levelup), true);
break;
case 'A':
xp_play_sample(ooii_snd_inflame, sizeof(ooii_snd_inflame), TRUE);
xp_play_sample(ooii_snd_inflame, sizeof(ooii_snd_inflame), true);
break;
case 'B':
switch(xp_random(3)) {
case 0:
xp_play_sample(ooii_snd_hit1, sizeof(ooii_snd_hit1), TRUE);
xp_play_sample(ooii_snd_hit1, sizeof(ooii_snd_hit1), true);
break;
case 1:
xp_play_sample(ooii_snd_hit2, sizeof(ooii_snd_hit2), TRUE);
xp_play_sample(ooii_snd_hit2, sizeof(ooii_snd_hit2), true);
break;
case 2:
xp_play_sample(ooii_snd_hit3, sizeof(ooii_snd_hit3), TRUE);
xp_play_sample(ooii_snd_hit3, sizeof(ooii_snd_hit3), true);
break;
}
break;
case 'C':
xp_play_sample(ooii_snd_timeisup, sizeof(ooii_snd_timeisup), TRUE);
xp_play_sample(ooii_snd_timeisup, sizeof(ooii_snd_timeisup), true);
break;
case 'D':
xp_play_sample(ooii_snd_healing, sizeof(ooii_snd_healing), TRUE);
xp_play_sample(ooii_snd_healing, sizeof(ooii_snd_healing), true);
break;
case 'E':
xp_play_sample(ooii_snd_lrange2, sizeof(ooii_snd_lrange2), TRUE);
xp_play_sample(ooii_snd_lrange2, sizeof(ooii_snd_lrange2), true);
break;
case 'F':
xp_play_sample(ooii_snd_cackle, sizeof(ooii_snd_cackle), TRUE);
xp_play_sample(ooii_snd_cackle, sizeof(ooii_snd_cackle), true);
break;
case 'G':
xp_play_sample(ooii_snd_teleport, sizeof(ooii_snd_teleport), TRUE);
xp_play_sample(ooii_snd_teleport, sizeof(ooii_snd_teleport), true);
break;
case 'H':
xp_play_sample(ooii_snd_genetics, sizeof(ooii_snd_genetics), TRUE);
xp_play_sample(ooii_snd_genetics, sizeof(ooii_snd_genetics), true);
break;
case 'I':
xp_play_sample(ooii_snd_remote, sizeof(ooii_snd_remote), TRUE);
xp_play_sample(ooii_snd_remote, sizeof(ooii_snd_remote), true);
break;
case 'J':
xp_play_sample(ooii_snd_afbdoor, sizeof(ooii_snd_afbdoor), TRUE);
xp_play_sample(ooii_snd_afbdoor, sizeof(ooii_snd_afbdoor), true);
break;
case 'K':
xp_play_sample(ooii_snd_alarm, sizeof(ooii_snd_alarm), TRUE);
xp_play_sample(ooii_snd_alarm, sizeof(ooii_snd_alarm), true);
break;
case 'L':
xp_play_sample(ooii_snd_reverse, sizeof(ooii_snd_reverse), TRUE);
xp_play_sample(ooii_snd_reverse, sizeof(ooii_snd_reverse), true);
break;
case 'M':
xp_play_sample(ooii_snd_aerial, sizeof(ooii_snd_aerial), TRUE);
xp_play_sample(ooii_snd_aerial, sizeof(ooii_snd_aerial), true);
break;
case 'N':
xp_play_sample(ooii_snd_phaser, sizeof(ooii_snd_phaser), TRUE);
xp_play_sample(ooii_snd_phaser, sizeof(ooii_snd_phaser), true);
break;
case 'O':
switch(xp_random(3)) {
case 0:
xp_play_sample(ooii_snd_miss1, sizeof(ooii_snd_miss1), TRUE);
xp_play_sample(ooii_snd_miss1, sizeof(ooii_snd_miss1), true);
break;
case 1:
xp_play_sample(ooii_snd_miss2, sizeof(ooii_snd_miss2), TRUE);
xp_play_sample(ooii_snd_miss2, sizeof(ooii_snd_miss2), true);
break;
case 2:
xp_play_sample(ooii_snd_miss3, sizeof(ooii_snd_miss3), TRUE);
xp_play_sample(ooii_snd_miss3, sizeof(ooii_snd_miss3), true);
break;
}
break;
case 'P':
if(xp_random(2))
xp_play_sample(ooii_snd_music1, sizeof(ooii_snd_music1), TRUE);
xp_play_sample(ooii_snd_music1, sizeof(ooii_snd_music1), true);
else
xp_play_sample(ooii_snd_music2, sizeof(ooii_snd_music2), TRUE);
xp_play_sample(ooii_snd_music2, sizeof(ooii_snd_music2), true);
break;
case 'Q':
xp_play_sample(ooii_snd_device, sizeof(ooii_snd_device), TRUE);
xp_play_sample(ooii_snd_device, sizeof(ooii_snd_device), true);
break;
case 'R':
xp_play_sample(ooii_snd_death, sizeof(ooii_snd_death), TRUE);
xp_play_sample(ooii_snd_death, sizeof(ooii_snd_death), true);
break;
case 'S':
xp_play_sample(ooii_snd_good, sizeof(ooii_snd_good), TRUE);
xp_play_sample(ooii_snd_good, sizeof(ooii_snd_good), true);
break;
case 'T':
xp_play_sample(ooii_snd_yahoo, sizeof(ooii_snd_yahoo), TRUE);
xp_play_sample(ooii_snd_yahoo, sizeof(ooii_snd_yahoo), true);
break;
case 'U':
xp_play_sample(ooii_snd_scream2, sizeof(ooii_snd_scream2), TRUE);
xp_play_sample(ooii_snd_scream2, sizeof(ooii_snd_scream2), true);
break;
case 'V':
xp_play_sample(ooii_snd_wap, sizeof(ooii_snd_wap), TRUE);
xp_play_sample(ooii_snd_wap, sizeof(ooii_snd_wap), true);
break;
case 'W':
xp_play_sample(ooii_snd_zip, sizeof(ooii_snd_zip), TRUE);
xp_play_sample(ooii_snd_zip, sizeof(ooii_snd_zip), true);
break;
case 'X':
xp_play_sample(ooii_snd_lrange3, sizeof(ooii_snd_lrange3), TRUE);
xp_play_sample(ooii_snd_lrange3, sizeof(ooii_snd_lrange3), true);
break;
case 'Y':
xp_play_sample(ooii_snd_snip, sizeof(ooii_snd_snip), TRUE);
xp_play_sample(ooii_snd_snip, sizeof(ooii_snd_snip), true);
break;
case 'Z':
xp_play_sample(ooii_snd_pow, sizeof(ooii_snd_pow), TRUE);
xp_play_sample(ooii_snd_pow, sizeof(ooii_snd_pow), true);
break;
default:
/* LRANGE1 is unused */
/* xp_play_sample(ooii_snd_lrange1, sizeof(ooii_snd_lrange1), TRUE); */
/* xp_play_sample(ooii_snd_lrange1, sizeof(ooii_snd_lrange1), true); */
break;
}
return(codeStr-origCodeStr);
}
BOOL handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize)
bool handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize)
{
BOOL quit=FALSE;
bool quit=false;
char menuBlock[255];
int zz;
......@@ -1717,7 +1718,7 @@ BOOL handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *ret
codeStr += incomingSoundVoc(codeStr);
break;
case '\\' :
quit=TRUE;
quit=true;
//quitTerm=1;
break;
case '?':
......
#ifndef _OOII_H_
#define _OOII_H_
#include <genwrap.h>
#include <stdbool.h>
#define MAX_OOII_MODE 3
BOOL handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize);
bool handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize);
#endif
......@@ -7944,10 +7944,10 @@ rv_termset(const char * const var, const void * const data)
case 'D':
switch(var[5]) {
case 'F':
cterm->doorway_mode = FALSE;
cterm->doorway_mode = false;
return NULL;
case 'N':
cterm->doorway_mode = TRUE;
cterm->doorway_mode = true;
return NULL;
}
break;
......@@ -7964,12 +7964,12 @@ rv_termset(const char * const var, const void * const data)
switch(var[5]) {
case 'F':
gettextinfo(&ti);
term.nostatus = TRUE;
term.nostatus = true;
reinit_screen(font, width, height);
return NULL;
case 'N':
gettextinfo(&ti);
term.nostatus = FALSE;
term.nostatus = false;
reinit_screen(font, width, height);
return NULL;
}
......@@ -10652,7 +10652,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
* half the full height. The ellipse is drawn according to the current
* line thickness, but the current line pattern has no effect.
*/
handled = TRUE;
handled = true;
GET_XY();
arg1 = parse_mega(&args[4], 2);
arg2 = parse_mega(&args[6], 2);
......@@ -11132,7 +11132,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
* current drawing color and line thickness. The Line Pattern feature
* does not apply to this command.
*/
handled = TRUE;
handled = true;
GET_XY();
arg1 = parse_mega(&args[4], 2);
arg2 = parse_mega(&args[6], 2);
......
......@@ -82,7 +82,7 @@ int rlogin_connect(struct bbslist *bbs)
char *passwd;
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
ruser=bbs->user;
passwd=bbs->password;
......
......@@ -21,7 +21,7 @@
SOCKET ssh_sock;
CRYPT_SESSION ssh_session;
int ssh_active=FALSE;
int ssh_active=true;
pthread_mutex_t ssh_mutex;
void cryptlib_error_message(int status, const char * msg)
......@@ -69,11 +69,11 @@ void ssh_input_thread(void *args)
if(cryptStatusError(status)) {
if(status==CRYPT_ERROR_COMPLETE || status == CRYPT_ERROR_READ) { /* connection closed */
ssh_active=FALSE;
ssh_active=true;
break;
}
cryptlib_error_message(status, "recieving data");
ssh_active=FALSE;
ssh_active=true;
break;
}
else {
......@@ -111,11 +111,11 @@ void ssh_output_thread(void *args)
pthread_mutex_unlock(&ssh_mutex);
if(cryptStatusError(status)) {
if(status==CRYPT_ERROR_COMPLETE) { /* connection closed */
ssh_active=FALSE;
ssh_active=true;
break;