X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient.c;h=fa139d2e31461155f6507c5e2982ed61de42a4f6;hp=6a634b4f92c4464aa00ab716b3c3122676d3d1a0;hb=1ea936cbf1bb3b19bd55839b904ef59ada84b8b5;hpb=65bb39eb3f473859544469c209b6371e230ac9a2 diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index 6a634b4f..fa139d2e 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 1997 - 2007 Pekka Riikonen + Copyright (C) 1997 - 2008 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,6 @@ GNU General Public License for more details. */ -/* $Id$ */ #include "silc.h" #include "silcclient.h" @@ -149,7 +148,15 @@ static void silc_client_packet_error(SilcPacketEngine engine, void *callback_context, void *stream_context) { - /* Nothing */ + SilcClient client = callback_context; + SilcClientConnection conn = stream_context; + + /* Read and write errors are silent */ + if (error == SILC_PACKET_ERR_READ || error == SILC_PACKET_ERR_WRITE) + return; + + client->internal->ops->say(client, conn, SILC_CLIENT_MESSAGE_ERROR, + (char *)silc_packet_error_string(error)); } /* Packet stream callbacks */ @@ -1032,7 +1039,7 @@ SilcBool silc_client_init(SilcClient client, const char *username, silc_rng_global_init(client->rng); /* Initialize the scheduler */ - client->schedule = silc_schedule_init(0, client, NULL); + client->schedule = silc_schedule_init(0, client, NULL, NULL); if (!client->schedule) return FALSE;