updates.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 29 Oct 2001 19:26:11 +0000 (19:26 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 29 Oct 2001 19:26:11 +0000 (19:26 +0000)
CHANGES
TODO
apps/silcd/packet_receive.c
apps/silcd/server_util.c
doc/draft-riikonen-silc-pp-04.nroff

diff --git a/CHANGES b/CHANGES
index 77fa1102e5695688d458edfb434c857578e3b688..b5fe2a1d55d2ac2ffbc4d012c0328b71b605e6d3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,23 @@
+Mon Oct 29 17:43:04 EST 2001  Pekka Riikonen <priikone@silcnet.org>
+
+       * 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 <priikone@silcnet.org>
 
        * Added SilcClietFileError enum to indicate error in
diff --git a/TODO b/TODO
index dd3db5c99346f42833a4d35d2da5a698afb2d97a..feb6e8bcd69032d75863e34d67b6f30ee8c1066c 100644 (file)
--- 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,
index dff4f079a681d4d9eb9e5ff698c6c77384dc1e19..3d4662e3d91b55ee4acd1e4d59c3c1a0bf888bdc 100644 (file)
@@ -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. */
index 40aafc1cfc6ee72aafa6d5ea4c3b6f8a9113a212..5f4c9ea855a3fdc2f02505d029179532e1006517 100644 (file)
@@ -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);
index 29cec084f4a8c0175de63b24e8fab97b8dd9f16c..d825d1ff60467bf962d43b2acab429db075e1181 100644 (file)
@@ -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) <Server ID>   (n) [<Client ID>   [...]
+          Arguments:  (1) <Server ID>   (n) [<Client ID>]   [...]
 
       The <Server ID> is the server's ID.  The rest of the arguments
       are the Client ID's of the client's which are coming from this