mirror of
https://github.com/hexchat/hexchat.git
synced 2024-09-20 01:21:32 +02:00
Consistently set the SSL state in /reconnect.
We need to use a temporary variable here as we're overwriting the existing server object which may have values set here already.
This commit is contained in:
parent
623d93c6f1
commit
f5926fbd23
@ -3227,17 +3227,21 @@ cmd_reconnect (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
|||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
|
int use_ssl = FALSE;
|
||||||
|
int use_ssl_noverify = FALSE;
|
||||||
if (g_strcmp0 (word[2], "-ssl") == 0)
|
if (g_strcmp0 (word[2], "-ssl") == 0)
|
||||||
{
|
{
|
||||||
serv->use_ssl = TRUE;
|
use_ssl = TRUE;
|
||||||
serv->accept_invalid_cert = FALSE;
|
use_ssl_noverify = FALSE;
|
||||||
offset++; /* args move up by 1 word */
|
offset++; /* args move up by 1 word */
|
||||||
} else if (g_strcmp0 (word[2], "-ssl-noverify") == 0)
|
} else if (g_strcmp0 (word[2], "-ssl-noverify") == 0)
|
||||||
{
|
{
|
||||||
serv->use_ssl = TRUE;
|
use_ssl = TRUE;
|
||||||
serv->accept_invalid_cert = TRUE;
|
use_ssl_noverify = TRUE;
|
||||||
offset++; /* args move up by 1 word */
|
offset++; /* args move up by 1 word */
|
||||||
}
|
}
|
||||||
|
serv->use_ssl = use_ssl;
|
||||||
|
serv->accept_invalid_cert = use_ssl_noverify;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (*word[4+offset])
|
if (*word[4+offset])
|
||||||
|
Loading…
Reference in New Issue
Block a user