From ce224ba8563054523412d09dd7e9165bb80612d6 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sun, 13 May 2007 14:40:27 +0000 Subject: [PATCH] updates. --- CHANGES | 17 +++++++++++++++++ lib/doc/porting.html | 7 +++++-- lib/silcclient/tests/test_silcclient.c | 13 +++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 5c6211bc..157e5fcb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,20 @@ +Sun May 13 18:27:13 EEST 2007 Pekka Riikonen + + * 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 + + * Fix several warnings in Irssi's Makefiles. + Sun May 13 12:16:30 CEST 2007 Jochen Eisinger * Disable ASM if --with-pic was given. Affected file is diff --git a/lib/doc/porting.html b/lib/doc/porting.html index ba0213dd..665357f7 100644 --- a/lib/doc/porting.html +++ b/lib/doc/porting.html @@ -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.
 
The silc_client_stop function takes new SilcClientStopped callback as diff --git a/lib/silcclient/tests/test_silcclient.c b/lib/silcclient/tests/test_silcclient.c index 267c04a1..19ccbb98 100644 --- a/lib/silcclient/tests/test_silcclient.c +++ b/lib/silcclient/tests/test_silcclient.c @@ -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); } -- 2.24.0