diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h index 9ca0dd785f4a8347893fa3ac9c177ca9d3042cd2..dfd83e1e17ceca986fc843fd3fe934e50db50efe 100644 --- a/src/sbbs3/sbbs.h +++ b/src/sbbs3/sbbs.h @@ -377,6 +377,7 @@ typedef struct js_callback { /* Synchronet Node Instance class definition */ #if defined(__cplusplus) && defined(JAVASCRIPT) +#include <atomic> #include <string> #include <unordered_map> @@ -414,7 +415,7 @@ public: CRYPT_SESSION ssh_session=-1; #endif int session_channel=-1; - bool ssh_mode = false; + std::atomic<bool> ssh_mode = false; SOCKET passthru_socket=INVALID_SOCKET; bool passthru_socket_active = false; void passthru_socket_activate(bool); @@ -467,7 +468,7 @@ public: uchar telnet_cmd[64]{}; uint telnet_cmdlen = 0; uint telnet_cmds_received = 0; - uint telnet_mode = 0; + std::atomic<uint> telnet_mode = 0; /* input_thread() writes to these variables: */ uchar telnet_last_rxch = 0; char telnet_location[128]{};