From e8acab85e0f5af94a58e383c46dc596b4792e585 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 1 Nov 2002 12:17:39 +0000 Subject: [PATCH] Added asserts for mandatory stuff. --- lib/silcclient/client.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index e08ddffa..4cc836c8 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -104,6 +104,10 @@ int silc_client_init(SilcClient client) { SILC_LOG_DEBUG(("Initializing client")); + assert(client->username); + assert(client->hostname); + assert(client->realname); + /* Initialize the crypto library. If application has done this already this has no effect. Also, we will not be overriding something application might have registered earlier. */ @@ -163,6 +167,10 @@ void silc_client_run(SilcClient client) { SILC_LOG_DEBUG(("Running client")); + assert(client->pkcs); + assert(client->public_key); + assert(client->private_key); + /* Start the scheduler, the heart of the SILC client. When this returns the program will be terminated. */ silc_schedule(client->schedule); @@ -458,6 +466,10 @@ void silc_client_start_key_exchange(SilcClient client, SilcClientConnection conn, int fd) { + assert(client->pkcs); + assert(client->public_key); + assert(client->private_key); + /* Allocate new socket connection object */ silc_socket_alloc(fd, SILC_SOCKET_TYPE_SERVER, (void *)conn, &conn->sock); -- 2.24.0