From: Pekka Riikonen Date: Mon, 29 Oct 2001 19:26:11 +0000 (+0000) Subject: updates. X-Git-Tag: silcertest~61 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=7f771866f95a5bf99b298fd79933779bc037da9c updates. --- diff --git a/CHANGES b/CHANGES index 77fa1102..b5fe2a1d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,23 @@ +Mon Oct 29 17:43:04 EST 2001 Pekka Riikonen + + * Fixed a crash in silc_client_ftp_free_sessions and + silc_client_ftp_session_free_client. Affected file + lib/silcclient/client_ftp.c. + + * Added `disabled' field in the SilcChannelEntry in the server + to indicate if the server entry is disabled. Affected file + silcd/idlist.h, silcd/command[_reply].c. + + * SILC server adds now /var/run/silcd.pid everytime it is + started. Affected file silcd/silcd.c. + + * Added silc_server_packet_send_clients to send a packet to + the provided table of client entries. Affected file + silcd/packet_send.[ch]. + + * Fixed a crash in client resolving in client_prvmsg.c in + client library. Affected file lib/silcclient/client_prvmsg.c. + Sun Oct 28 18:46:27 EST 2001 Pekka Riikonen * Added SilcClietFileError enum to indicate error in diff --git a/TODO b/TODO index dd3db5c9..feb6e8bc 100644 --- a/TODO +++ b/TODO @@ -93,8 +93,6 @@ TODO/bugs In SILC Server o silcd/serverid.c and its routines supports only IPv4. - o Add perhaps /var/run/silcd.pid for PID information for the server. - o New configuration file format must be added. The new one will be done using the dotconf config library (lib/dotconf). The following tasks relates closely to this as well and must be done at the same time @@ -118,6 +116,16 @@ TODO/bugs In SILC Server TODO/bugs In SILC Libraries =========================== + o Optimizations to lib/silcsftp + + o Do not allocate new req for every client request. Use + preallocated requests and recycle them. + + o Use SilcList instead of SilcDList for requests. It is faster. + + o Do not allocate new buffer for every packet. Use preallocated + buffer and reallocate only if necessary. + o Compression routines are missing. The protocol supports packet compression thus it must be implemented. SILC Comp API must be defined. zlib package is already included into the lib dir (in CVS, diff --git a/apps/silcd/packet_receive.c b/apps/silcd/packet_receive.c index dff4f079..3d4662e3 100644 --- a/apps/silcd/packet_receive.c +++ b/apps/silcd/packet_receive.c @@ -2165,9 +2165,6 @@ void silc_server_new_channel(SilcServer server, We also create a new key for the channel. */ SilcBuffer users = NULL, users_modes = NULL; - if (!channel->id) - channel->id = silc_id_dup(channel_id, SILC_ID_CHANNEL); - if (!SILC_ID_CHANNEL_COMPARE(channel_id, channel->id)) { /* They don't match, send CHANNEL_CHANGE notify to the server to force the ID change. */ diff --git a/apps/silcd/server_util.c b/apps/silcd/server_util.c index 40aafc1c..5f4c9ea8 100644 --- a/apps/silcd/server_util.c +++ b/apps/silcd/server_util.c @@ -97,7 +97,7 @@ static void silc_server_remove_clients_channels(SilcServer server, SilcChannelClientEntry chl2; SilcHashTableList htl2; - channel->id = NULL; + channel->disabled = TRUE; silc_hash_table_list(channel->user_list, &htl2); while (silc_hash_table_get(&htl2, NULL, (void *)&chl2)) { @@ -182,7 +182,7 @@ bool silc_server_remove_clients_by_server(SilcServer server, } if (client->router != entry) { - if (server_signoff && client->connection) { + if (server_signoff) { clients = silc_realloc(clients, sizeof(*clients) * (clients_c + 1)); clients[clients_c] = client; @@ -275,7 +275,7 @@ bool silc_server_remove_clients_by_server(SilcServer server, /* Send the SERVER_SIGNOFF notify */ if (server_signoff) { - SilcBuffer args; + SilcBuffer args, not; /* Send SERVER_SIGNOFF notify to our primary router */ if (!server->standalone && server->router && @@ -291,17 +291,18 @@ bool silc_server_remove_clients_by_server(SilcServer server, silc_buffer_free(args); } + /* Send to local clients */ args = silc_argument_payload_encode(argc, argv, argv_lens, argv_types); - /* Send to local clients */ - for (i = 0; i < clients_c; i++) { - silc_server_send_notify_args(server, clients[i]->connection, - FALSE, SILC_NOTIFY_TYPE_SERVER_SIGNOFF, - argc, args); - } + not = silc_notify_payload_encode_args(SILC_NOTIFY_TYPE_SERVER_SIGNOFF, + argc, args); + silc_server_packet_send_clients(server, clients, clients_c, + SILC_PACKET_NOTIFY, 0, FALSE, + not->data, not->len, FALSE); silc_free(clients); silc_buffer_free(args); + silc_buffer_free(not); for (i = 0; i < argc; i++) silc_free(argv[i]); silc_free(argv); diff --git a/doc/draft-riikonen-silc-pp-04.nroff b/doc/draft-riikonen-silc-pp-04.nroff index 29cec084..d825d1ff 100644 --- a/doc/draft-riikonen-silc-pp-04.nroff +++ b/doc/draft-riikonen-silc-pp-04.nroff @@ -1359,7 +1359,7 @@ Also, all ID's sent in arguments are sent inside ID Payload. server that are on channels must be removed from the channel. Max Arguments: 2000 - Arguments: (1) (n) [ [...] + Arguments: (1) (n) [] [...] The is the server's ID. The rest of the arguments are the Client ID's of the client's which are coming from this