Skip to content

Commit

Permalink
Merge pull request #3 from mariux64/0.5
Browse files Browse the repository at this point in the history
0.5
  • Loading branch information
donald authored May 20, 2021
2 parents 378566b + ab01622 commit e84dd2b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mxshadowsrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ static void unmap_shadow(char *shadow_buf, struct stat *statbuf) {
#define MAX_THREADS 8
#define TIMEOUT 30000 // client timeout in msec

pthread_mutex_t shadow_mutex = PTHREAD_MUTEX_INITIALIZER ;
char *shadow_buf = NULL; // protected by shadow_mutex
struct stat statbuf; // protected by shadow_mutex
SSL_CTX *ssl_ctx;
sem_t free_worker;
static pthread_mutex_t shadow_mutex = PTHREAD_MUTEX_INITIALIZER ;
static char *shadow_buf = NULL; // protected by shadow_mutex
static struct stat statbuf; // protected by shadow_mutex
static SSL_CTX *ssl_ctx;
static sem_t free_worker;
#ifdef DEBUG_MAX_CONNECTS
static int debug_remaining_connects = DEBUG_MAX_CONNECTS;
#endif
Expand Down Expand Up @@ -249,7 +249,7 @@ int main(int argc, char **argv) {
if (SSL_CTX_use_certificate_file(ssl_ctx, cert_file, SSL_FILETYPE_PEM) <= 0) { psslerror("SSL_CTX_use_certificate_file"); return 1; }

int listen_socket = socket(AF_INET, SOCK_STREAM, 0);
if (listen_socket == 0) { perror("socket"); return 1; }
if (listen_socket == -1) { perror("socket"); return 1; }

static int true = 1;
int status = setsockopt(listen_socket, SOL_SOCKET, SO_REUSEADDR, &true, sizeof(true));
Expand Down

0 comments on commit e84dd2b

Please sign in to comment.