update.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 20 Feb 2001 15:56:12 +0000 (15:56 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 20 Feb 2001 15:56:12 +0000 (15:56 +0000)
lib/silcclient/client.c
lib/silcmath/mpbin.c

index bc7d8dfe363194265a001dd94c38440ab7a11e65..9b34079ac05b5600c51e3c78a828f32a8cf318d3 100644 (file)
@@ -54,6 +54,9 @@ SilcClient silc_client_alloc(SilcClientOperations *ops, void *application)
 void silc_client_free(SilcClient client)
 {
   if (client) {
+    if (client->rng)
+      silc_rng_free(client->rng);
+
     silc_free(client);
   }
 }
@@ -76,7 +79,7 @@ int silc_client_init(SilcClient client)
   /* Initialize random number generator */
   client->rng = silc_rng_alloc();
   silc_rng_init(client->rng);
-  silc_math_primegen_init(); /* XXX */
+  silc_rng_global_init(client->rng);
 
   /* Register protocols */
   silc_client_protocols_register();
index 8b598aa1a1f4759196ee96291b3510cd95dcba27..555dbebf04e26821514ff8555ed79a4e7ff84137 100644 (file)
@@ -52,8 +52,7 @@ unsigned char *silc_mp_mp2bin(SilcInt *val, unsigned int len,
 }
 
 /* Samve as above but does not allocate any memory.  The encoded data is
-   returned into `dst' and it's length to the `ret_len'. If `dst_len is
-   non-zero then the destination buffer is assumbed to be that large. */
+   returned into `dst' and it's length to the `ret_len'. */
 
 void silc_mp_mp2bin_noalloc(SilcInt *val, unsigned char *dst,
                            unsigned int dst_len)