projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
763b442
)
Added asserts for mandatory stuff.
author
Pekka Riikonen
<priikone@silcnet.org>
Fri, 1 Nov 2002 12:17:39 +0000
(12:17 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Fri, 1 Nov 2002 12:17:39 +0000
(12:17 +0000)
lib/silcclient/client.c
patch
|
blob
|
history
diff --git
a/lib/silcclient/client.c
b/lib/silcclient/client.c
index e08ddffa6ca846bc13f168208ce03af64d8183d1..4cc836c88756d887e835f2569070efb8137f8b9f 100644
(file)
--- 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"));
{
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. */
/* 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"));
{
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);
/* 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)
{
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);
/* Allocate new socket connection object */
silc_socket_alloc(fd, SILC_SOCKET_TYPE_SERVER, (void *)conn, &conn->sock);