Fixed bug in sslh-select: if socket dropped while defered_data was present, sslh-select would crash.

This commit is contained in:
Yves Rutschle committed 2013-07-20 00:45:33 +02:00
1 parent f842e2e081
commit d02ffcd154
2 files changed
+6 -1

No files matched your search

+4
View File
@@ -1,3 +1,7 @@
vNEXT:
Fixed bug in sslh-select: if socket dropped while
defered_data was present, sslh-select would crash.
v1.14: 21DEC2012
Corrected OpenVPN probe to support pre-shared secret
mode (OpenVPN port-sharing code is... wrong). Thanks
+2 -1
View File
@@ -261,7 +261,7 @@ void main_loop(int listen_sockets[], int num_addr_listen)
tidy_connection(&cnx[i], &fds_r, &fds_w);
if (verbose)
fprintf(stderr, "closed slot %d\n", i);
}
} else {
/* If no defered data is left, stop monitoring the fd
* for write, and restart monitoring the other one for reads*/
if (!cnx[i].q[j].defered_data_size) {
@@ -272,6 +272,7 @@ void main_loop(int listen_sockets[], int num_addr_listen)
}
}
}
}
/* Check all sockets for read activity */
for (i = 0; i < num_cnx; i++) {