Skip to content

Commit

Permalink
Remove useless create_flag and re-align struct (#3847)
Browse files Browse the repository at this point in the history
  • Loading branch information
twose authored Nov 17, 2020
1 parent e3149f8 commit f9b0c71
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/coroutine/socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,6 @@ bool Socket::ssl_check_context() {
#ifdef SW_SUPPORT_DTLS
socket->dtls = 1;
ssl_option.protocols = SW_SSL_DTLS;
ssl_option.create_flag = SW_SSL_CLIENT;
#else
swWarn("DTLS support require openssl-1.1 or later");
return false;
Expand Down
1 change: 0 additions & 1 deletion src/network/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ static int Client_udp_connect(Client *cli, const char *host, int port, double ti
{
udp_connect = 1;
cli->ssl_option.protocols = SW_SSL_DTLS;
cli->ssl_option.create_flag = SW_SSL_CLIENT;
cli->socket->dtls = 1;
cli->socket->chunk_size = SW_BUFFER_SIZE_STD;
cli->send = Client_tcp_send_sync;
Expand Down
1 change: 0 additions & 1 deletion src/server/master.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,6 @@ ListenPort *Server::add_port(enum swSocket_type type, const char *host, int port

if (ls->is_dgram()) {
#ifdef SW_SUPPORT_DTLS
ls->ssl_option.create_flag = SW_SSL_SERVER;
ls->ssl_option.protocols = SW_SSL_DTLS;
ls->dtls_sessions = new std::unordered_map<int, dtls::Session *>;

Expand Down

0 comments on commit f9b0c71

Please sign in to comment.