Added SILC_CLIENT_CONN_ERROR_KE, ERROR_AUTH, ERROR_RESUME and
authorPekka Riikonen <priikone@silcnet.org>
Wed, 14 Jan 2004 16:45:21 +0000 (16:45 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 14 Jan 2004 16:45:21 +0000 (16:45 +0000)
        ERROR_TIMEOUT SilcClientConnectionStatus errors.

CHANGES
lib/silcclient/client.c
lib/silcclient/silcclient.h

diff --git a/CHANGES b/CHANGES
index 3e9a8c816558a17e10c063eafdaa87accb4d7e6e..4f36eee814b029bcd1fb4c7f0e69d0cc6395b845 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+Wed Jan 14 18:42:44 EET 2004  Pekka Riikonen <priikone@silcnet.org>
+
+       * 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 <jochen@penguin-breeder.org>
 
        * When resuming a session fails, notify the user that the session
index 7c3a0291b74fa33f5396936da48494d5a9a04e37..e023ff23bfad7f5aa3a825e1facdb301927e24da 100644 (file)
@@ -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
index 693ae636ce424401c4ee2082591cfce557520096..815644530ad454e242889c9d5cf7120cd612b724 100644 (file)
@@ -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;
 /***/