From 9af7e9bdf09f28cfaf95ab1c630120b3797a10ae Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 1 Jun 2001 11:09:41 +0000 Subject: [PATCH] updates. --- CHANGES | 4 ++++ apps/irssi/src/fe-common/silc/module-formats.c | 1 + apps/irssi/src/fe-common/silc/module-formats.h | 2 ++ apps/irssi/src/silc/core/client_ops.c | 9 ++++++++- lib/silcclient/client.c | 6 +----- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 21aac107..aa26761d 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,10 @@ Fri Jun 1 10:28:09 EEST 2001 Pekka Riikonen * Removed silc_client_packet_send_flush from the client library as it is not needed. Affected file lib/silcclient/client.[ch]. + * Added printing of message of unresolved authentication method + to the Irssi SILC client. Added it to the module formats. + Removed the same message from the client library. + Thu May 31 13:57:33 CEST 2001 Pekka Riikonen * Added new distribution feature, DISTLABEL. Every distribution diff --git a/apps/irssi/src/fe-common/silc/module-formats.c b/apps/irssi/src/fe-common/silc/module-formats.c index 9e8ddfb0..70535e92 100644 --- a/apps/irssi/src/fe-common/silc/module-formats.c +++ b/apps/irssi/src/fe-common/silc/module-formats.c @@ -103,6 +103,7 @@ FORMAT_REC fecommon_silc_formats[] = { { "auth_failed", "Authentication failed", 0 }, { "set_away", "You have meen marked as being away (away message: {hilight $0})", 1, { 0 } }, { "unset_away", "You are no longer marked as being away", 0 }, + { "auth_meth_unresolved", "Could not resolve authentication method to use, assume no authentication", 0 }, { NULL, NULL, 0 } }; diff --git a/apps/irssi/src/fe-common/silc/module-formats.h b/apps/irssi/src/fe-common/silc/module-formats.h index b1de6171..2a4a8a66 100644 --- a/apps/irssi/src/fe-common/silc/module-formats.h +++ b/apps/irssi/src/fe-common/silc/module-formats.h @@ -97,6 +97,8 @@ enum { SILCTXT_AUTH_FAILED, SILCTXT_SET_AWAY, SILCTXT_UNSET_AWAY, + SILCTXT_AUTH_METH_UNRESOLVED, + }; extern FORMAT_REC fecommon_silc_formats[]; diff --git a/apps/irssi/src/silc/core/client_ops.c b/apps/irssi/src/silc/core/client_ops.c index 430da6ae..62ba8be9 100644 --- a/apps/irssi/src/silc/core/client_ops.c +++ b/apps/irssi/src/silc/core/client_ops.c @@ -930,6 +930,8 @@ int silc_get_auth_method(SilcClient client, SilcClientConnection conn, unsigned char **auth_data, uint32 *auth_data_len) { + bool ret = TRUE; + SILC_SERVER_REC *server = conn ? conn->context : NULL; /* XXX must resolve from configuration whether this connection has any specific authentication data */ @@ -938,7 +940,12 @@ int silc_get_auth_method(SilcClient client, SilcClientConnection conn, *auth_data = NULL; *auth_data_len = 0; - return TRUE; + if (ret == FALSE) { + printformat_module("fe-common/silc", server, NULL, + MSGLEVEL_MODES, SILCTXT_AUTH_METH_UNRESOLVED); + } + + return ret; } /* Notifies application that failure packet was received. This is called diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index f061327f..ac029e2b 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -467,12 +467,8 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_second) if (!client->ops->get_auth_method(client, sock->user_data, sock->hostname, sock->port, &proto_ctx->auth_meth, &proto_ctx->auth_data, - &proto_ctx->auth_data_len)) { - client->ops->say(client, ctx->sock->user_data, - "Could not resolve authentication method to use, " - "assume no authentication"); + &proto_ctx->auth_data_len)) proto_ctx->auth_meth = SILC_AUTH_NONE; - } /* Free old protocol as it is finished now */ silc_protocol_free(protocol); -- 2.24.0