updates.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 13 May 2007 14:40:27 +0000 (14:40 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 13 May 2007 14:40:27 +0000 (14:40 +0000)
CHANGES
lib/doc/porting.html
lib/silcclient/tests/test_silcclient.c

diff --git a/CHANGES b/CHANGES
index 5c6211bc4a7d6f2cf462ae4e1f23a44a1107b9de..157e5fcba2a14d7d2a1db9ca584e275982e6b954 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,20 @@
+Sun May 13 18:27:13 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Fixed client library initialization when the running callback
+         is not given to silc_client_init.  Affected file is
+         lib/silcclient/client.c.
+
+       * Fixed Symbian compilation problems around the tree.  Added
+         new Carbide.c++ project files to symbian/ directory.
+
+       * Fixed SilcLog API to work on Symbian.  On Symbian it doesn't
+         use any globals.  Affected files are lib/silcutil/silclog.c
+         and silclog_i.h.
+
+Sun May 13 16:54:35 CEST 2007  Jochen Eisinger <coffee@silcnet.org>
+
+       * Fix several warnings in Irssi's Makefiles.
+
 Sun May 13 12:16:30 CEST 2007  Jochen Eisinger <coffee@silcnet.org>
 
        * Disable ASM if --with-pic was given.  Affected file is
index ba0213dd3b38cbb4b07cd8bfb44bdd61046cbe3f..665357f7c73fbbca68a4c86a0aa7c3c24a7c1951 100644 (file)
@@ -109,8 +109,11 @@ by the application to update directly to SilcClient pointer.  This is not
 longer required.  Also the nickname is no longer required to be put to
 SilcClient context as it has been made SilcClientConnection specific.
 The function also takes a SilcClientRunning callback as argument which will
-be called when the client library is running.  After that callback the
-xapplication may start using other client library API functions.
+be called when the client library is running.  Only after the callback is
+delivered may the application start using other client library API functions.
+For example, connecting to a server will fail if it is performed before
+the SilcClientRunning callback is called.  The callback is called after the
+silc_client_run or silc_client_run_one has been called.
 
 <br />&nbsp;<br />
 The silc_client_stop function takes new SilcClientStopped callback as
index 267c04a1962e8bb80fda2f5ed98b976603b90cbc..19ccbb9889b0c4832f541b096a8474a6aa2ffb1f 100644 (file)
@@ -61,8 +61,8 @@ static void silc_running(SilcClient client, void *application)
 
   SILC_LOG_DEBUG(("Client is running"));
 
-  /* Start connecting to server.  This is asynchronous connecting so the
-     connection is actually created later after we run the client. */
+  /* Connect to server.  The silc_connected callback will be called after
+     the connection is established or if an error occurs during connecting. */
   silc_client_connect_to_server(mybot->client, NULL,
                                mybot->public_key, mybot->private_key,
                                "silc.silcnet.org", 706,
@@ -298,6 +298,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
      different arguments the client library returns. */
   if (command == SILC_COMMAND_JOIN) {
     SilcChannelEntry channel;
+    SilcHash sha1hash;
 
     (void)va_arg(ap, SilcClientEntry);
     channel = va_arg(ap, SilcChannelEntry);
@@ -309,11 +310,14 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
                                     "hello", strlen("hello"));
     fprintf(stdout, "MyBot: Sent 'hello' to channel\n");
 
-    /* Now send digitally signed "hello" to the channel */
+    /* Now send digitally signed "hello" to the channel.  We have to allocate
+       hash function for the signature process. */
+    silc_hash_alloc("sha1", &sha1hash);
     silc_client_send_channel_message(client, conn, channel, NULL,
-                                    SILC_MESSAGE_FLAG_SIGNED, NULL,
+                                    SILC_MESSAGE_FLAG_SIGNED, sha1hash,
                                     "hello, with signature",
                                     strlen("hello, with signature"));
+    silc_hash_free(sha1hash);
     fprintf(stdout, "MyBot: Sent 'hello, with signature' to channel\n");
   }
 }
@@ -350,6 +354,7 @@ silc_verify_public_key(SilcClient client, SilcClientConnection conn,
                       SilcPublicKey public_key,
                       SilcVerifyPublicKey completion, void *context)
 {
+  fprintf(stdout, "MyBot: server's public key\n");
   silc_show_public_key(public_key);
   completion(TRUE, context);
 }