Skip to content
Snippets Groups Projects
Commit 69b78d94 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix CID 469129 and 469141 using std::atomic<>

Unlikely, but valid thread-safety concerns by Coverity
parent a1c3e878
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -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]{};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment