From: Pekka Riikonen Date: Wed, 14 Jan 2004 16:45:21 +0000 (+0000) Subject: Added SILC_CLIENT_CONN_ERROR_KE, ERROR_AUTH, ERROR_RESUME and X-Git-Tag: silc.server.0.9.17~47 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=49fc10ba3e5d0dbbc359e9ec016a3727652af2f7 Added SILC_CLIENT_CONN_ERROR_KE, ERROR_AUTH, ERROR_RESUME and ERROR_TIMEOUT SilcClientConnectionStatus errors. --- diff --git a/CHANGES b/CHANGES index 3e9a8c81..4f36eee8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Wed Jan 14 18:42:44 EET 2004 Pekka Riikonen + + * Added SILC_CLIENT_CONN_ERROR_KE, ERROR_AUTH, ERROR_RESUME and + ERROR_TIMEOUT SilcClientConnectionStatus errors. Affected + files are lib/silcclient/silcclient.h, client.c. + Mon Jan 12 13:01:10 CET 2004 Jochen Eisinger * When resuming a session fails, notify the user that the session diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index 7c3a0291..e023ff23 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -572,7 +572,7 @@ SILC_TASK_CALLBACK(silc_client_connect_failure) SilcClient client = (SilcClient)ctx->client; client->internal->ops->connected(client, ctx->sock->user_data, - SILC_CLIENT_CONN_ERROR); + SILC_CLIENT_CONN_ERROR_KE); if (ctx->packet) silc_packet_context_free(ctx->packet); silc_free(ctx); @@ -588,7 +588,7 @@ SILC_TASK_CALLBACK(silc_client_connect_failure_auth) SilcClient client = (SilcClient)ctx->client; client->internal->ops->connected(client, ctx->sock->user_data, - SILC_CLIENT_CONN_ERROR); + SILC_CLIENT_CONN_ERROR_AUTH); silc_free(ctx); } @@ -636,7 +636,8 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_start) silc_free(ctx); /* Notify application of failure */ - client->internal->ops->connected(client, conn, SILC_CLIENT_CONN_ERROR); + client->internal->ops->connected(client, conn, + SILC_CLIENT_CONN_ERROR_TIMEOUT); } return; } @@ -1685,7 +1686,7 @@ static void silc_client_resume_session_cb(SilcClient client, /* Notify application that connection is created to server */ client->internal->ops->connected(client, conn, success ? SILC_CLIENT_CONN_SUCCESS_RESUME : - SILC_CLIENT_CONN_ERROR); + SILC_CLIENT_CONN_ERROR_RESUME); if (success) { /* Issue INFO command to fetch the real server name and server diff --git a/lib/silcclient/silcclient.h b/lib/silcclient/silcclient.h index 693ae636..81564453 100644 --- a/lib/silcclient/silcclient.h +++ b/lib/silcclient/silcclient.h @@ -494,7 +494,7 @@ typedef enum { * DESCRIPTION * * This type is returned to the `connect' client operation to indicate - * the status of the created connection. It can indicated if it was + * the status of the created connection. It can indicate if it was * successful or whether an error occurred. * * SOURCE @@ -503,7 +503,12 @@ typedef enum { SILC_CLIENT_CONN_SUCCESS, /* Successfully connected */ SILC_CLIENT_CONN_SUCCESS_RESUME, /* Successfully connected and resumed old detached session */ - SILC_CLIENT_CONN_ERROR, /* Error occurred during connecting */ + SILC_CLIENT_CONN_ERROR, /* Unknown error occurred during + connecting */ + SILC_CLIENT_CONN_ERROR_KE, /* Key Exchange failed */ + SILC_CLIENT_CONN_ERROR_AUTH, /* Authentication failed */ + SILC_CLIENT_CONN_ERROR_RESUME, /* Resuming failed */ + SILC_CLIENT_CONN_ERROR_TIMEOUT, /* Timeout during connecting */ } SilcClientConnectionStatus; /***/