mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 16:12:30 +02:00
Parse the error string received by the server
So that in case of SASL failure the user sees a nice error message.
This commit is contained in:
parent
1f114d75c6
commit
49c4ea5fd9
1 changed files with 7 additions and 1 deletions
|
|
@ -41,16 +41,22 @@ static void sasl_start (IRC_SERVER_REC *server, const char *data, const char *fr
|
||||||
|
|
||||||
static void sasl_fail (IRC_SERVER_REC *server, const char *data, const char *from)
|
static void sasl_fail (IRC_SERVER_REC *server, const char *data, const char *from)
|
||||||
{
|
{
|
||||||
|
char *params, *error;
|
||||||
|
|
||||||
/* Stop any pending timeout, if any */
|
/* Stop any pending timeout, if any */
|
||||||
if (server->sasl_timeout != -1) {
|
if (server->sasl_timeout != -1) {
|
||||||
g_source_remove(server->sasl_timeout);
|
g_source_remove(server->sasl_timeout);
|
||||||
server->sasl_timeout = -1;
|
server->sasl_timeout = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_critical("Authentication failed with reason \"%s\"", data);
|
params = event_get_params(data, 2, NULL, &error);
|
||||||
|
|
||||||
|
g_critical("Authentication failed with reason \"%s\"", error);
|
||||||
|
|
||||||
/* Terminate the negotiation */
|
/* Terminate the negotiation */
|
||||||
cap_finish_negotiation(server);
|
cap_finish_negotiation(server);
|
||||||
|
|
||||||
|
g_free(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sasl_already (IRC_SERVER_REC *server, const char *data, const char *from)
|
static void sasl_already (IRC_SERVER_REC *server, const char *data, const char *from)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue