Integer type name change.
[silc.git] / lib / silcclient / client_keyagr.c
index 2c5e20880c3ef617bdbb80d858d959d42c9892cb..87f13e1630cb5bb914622804524e4fc2eb0382a8 100644 (file)
@@ -24,7 +24,8 @@
    and in protocol.c. This file implements the client-to-client key 
    agreement as defined by the SILC protocol. */
 
-#include "clientlibincludes.h"
+#include "silcincludes.h"
+#include "silcclient.h"
 #include "client_internal.h"
 
 SILC_TASK_CALLBACK(silc_client_key_agreement_final);
@@ -298,7 +299,7 @@ void silc_client_send_key_agreement(SilcClient client,
                                    const char *hostname,
                                    const char *bindhost,
                                    int port,
-                                   uint32 timeout_secs,
+                                   SilcUInt32 timeout_secs,
                                    SilcKeyAgreementCallback completion,
                                    void *context)
 {
@@ -306,9 +307,7 @@ void silc_client_send_key_agreement(SilcClient client,
   SilcClientKeyAgreement ke = NULL;
   SilcBuffer buffer;
 
-  assert(client_entry);
-
-  if (client_entry->ke)
+  if (!client_entry || client_entry->ke)
     return;
 
   /* Create the listener if hostname and port was provided.
@@ -518,7 +517,8 @@ void silc_client_perform_key_agreement(SilcClient client,
 
   SILC_LOG_DEBUG(("Start"));
 
-  assert(client_entry && hostname && port);
+  if (!client_entry || !hostname || !port)
+    return;
 
   ke = silc_calloc(1, sizeof(*ke));
   ke->client = client;
@@ -556,7 +556,8 @@ void silc_client_perform_key_agreement_fd(SilcClient client,
 
   SILC_LOG_DEBUG(("Start"));
 
-  assert(client_entry);
+  if (!client_entry)
+    return;
 
   ke = silc_calloc(1, sizeof(*ke));
   ke->client = client;
@@ -614,7 +615,8 @@ void silc_client_abort_key_agreement(SilcClient client,
                                     SilcClientConnection conn,
                                     SilcClientEntry client_entry)
 {
-  assert(client_entry);
+  if (!client_entry)
+    return;
 
   if (client_entry->ke) {
     SilcClientKeyAgreement ke;
@@ -643,7 +645,7 @@ static void
 silc_client_key_agreement_resolve_cb(SilcClient client,
                                     SilcClientConnection conn,
                                     SilcClientEntry *clients,
-                                    uint32 clients_count,
+                                    SilcUInt32 clients_count,
                                     void *context)
 {
   SilcPacketContext *packet = (SilcPacketContext *)context;