updates.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 14 Feb 2007 14:44:51 +0000 (14:44 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 14 Feb 2007 14:44:51 +0000 (14:44 +0000)
CHANGES
TODO
configure.ad
lib/doc/notifyargs.html
lib/silcutil/tests/test_silcmutex.c

diff --git a/CHANGES b/CHANGES
index c8a43fb7f34ba00d2174aa43ad8c571198b97122..ca4646c810be8f585fbdd5cc0cd68885449479a2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,49 @@
+Wed Feb 14 17:05:38 EET 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Fixed packet wrapper stream API to support encoder/decoder
+         for packets, and to handle partial reading correctly.  Fixed
+         also inbuf size checking in reading to have enough space before
+         reading.  Affected files are lib/silccore/silcpacket.[ch].
+
+       * Rewrote file transfer in client library.  Affected files are
+         in lib/silcclient/.
+
+       * Added TCP/UDP listener (internal) API to client library to have
+         generic way of dealing with listeners.  Fixed Key Agreement and
+         file transfer to use it.  Affected files are in lib/silcclient/.
+
+       * Fixed SKE to process SUCCESS packets synchronously and to call
+         completion synchronously.  Affected file is lib/silcske/silske.c.
+
+       * Fixed pthread rwlock detection.  Affected file includes/silc.h.in.
+
+       * Implemented SILC_ATTRIBYUTE_PHONE_NUMBER.  Affected files are
+         lib/silccore/silcattrs.[ch].  SILC Protocol version 1.3 change.
+
+Fri Feb  2 22:24:11 EET 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Added support for SILC protocol version 1.3 NEW_CLIENT packet
+         to client library.  Affected file is
+         lib/silcclient/client_register.c.
+
+       * Serialize NICK and JOIN commands to avoid problems locally
+         with changing ID while joining to channel.  Affected file is
+         lib/silcclient/command.c.
+
+       * Fixed entry resolving while handling incoming JOIN notify.
+         Handle properly cases, in re-processing of notify packets, where
+         the IDs may become invalid while resolving the entry (like nick
+         change).  Entry is invalid if it doesn't have nickname, and such
+         entries are not delivered to application anymore.  These fixes
+         problems of not seeing JOINs when remote user changes nickname
+         at the same time.  Affected files are in lib/silcclient/.
+
+Thu Feb  1 18:35:58 EET 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Added support for computing message payload MAC in new way
+         (SILC Protocol version 1.3).  Bakcwards support for old way
+         remains.  Affected files are lib/silccore/silcmessage.[ch].
+
 Sat Jan 27 22:37:30 EET 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Added SilcRwLock API, a read/write lock.  Affected files are
 Sat Jan 27 22:37:30 EET 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Added SilcRwLock API, a read/write lock.  Affected files are
diff --git a/TODO b/TODO
index 5e7ca9a28db9c1f65f6055c0be283569f4e63237..8f748cfe679f53ee85094c899884ec6e279ad81d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,7 +9,7 @@ tested.
 SILC Client    ****PARTLY DONE****
 ===========
 
 SILC Client    ****PARTLY DONE****
 ===========
 
- o Porting to new Toolkit API and new Client Library API
+ o Porting to new Toolkit API and new Client Library API (***TESTING NEEDED)
 
  o Improve help files, especially /cmode, /cumode and /key.
 
 
  o Improve help files, especially /cmode, /cumode and /key.
 
@@ -21,11 +21,15 @@ lib/silcclient, The Client Library  ***PARTLY DONE****
 
  o silcclient_entry.h finishing, all entry relates APIs to this header.
 
 
  o silcclient_entry.h finishing, all entry relates APIs to this header.
 
- o SilcChannelEntry, SilcServerEntry, SilcChannelUser, allocating, 
-   freeing, finding, etc. rewrite.  Also making them reference counted for 
+ o SilcChannelEntry, SilcServerEntry, SilcChannelUser, allocating,
+   freeing, finding, etc. rewrite.  Also making them reference counted for
    multi threads use. (***DONE)
 
    multi threads use. (***DONE)
 
- o Finish all the missing SILC packet processings, rewrites.
+ o Rewrite silc_client_get_clients_by_channel.
+
+ o Rewrite client side WHOIS command (for whois -details).
+
+ o Finish all the missing SILC packet processings, rewrites. (***DONE)
 
  o The client_notify.c rewrite. (***TESTING NEEDED)
 
 
  o The client_notify.c rewrite. (***TESTING NEEDED)
 
@@ -36,7 +40,9 @@ lib/silcclient, The Client Library    ***PARTLY DONE****
 
  o Remove protocol.[ch]. (***DONE)
 
 
  o Remove protocol.[ch]. (***DONE)
 
- o File transfer rewrite.
+ o File transfer rewrite. (***TESTING NEEDED)
+
+ o File transfer API documentation.
 
  o Connection auth request. (***DONE)
 
 
  o Connection auth request. (***DONE)
 
@@ -44,7 +50,7 @@ lib/silcclient, The Client Library    ***PARTLY DONE****
 
  o Starting key exchange directly, rewrite. (***DONE)
 
 
  o Starting key exchange directly, rewrite. (***DONE)
 
- o Channel messages, channel private keys, channel entires, channel 
+ o Channel messages, channel private keys, channel entires, channel
    search, etc. rewrite.
 
  o For many APIs leave the hash context allocations to the caller instead
    search, etc. rewrite.
 
  o For many APIs leave the hash context allocations to the caller instead
@@ -142,6 +148,8 @@ lib/silccrypt                       ****PARTLY DONE****
  o Implement SILC Public Key Version 2 handling in sign/verify.  Implement
    Version (V) identifier (***DONE)
 
  o Implement SILC Public Key Version 2 handling in sign/verify.  Implement
    Version (V) identifier (***DONE)
 
+ o Add fingerprint to SilcSILCPublicKey and retrieval to silcpk.h.
+
  o Implement PKCS #1 sign/verify with hash OID. (***TESTING NEEDED)
 
  o Implement the defined SilcDH API.  The definition is in
  o Implement PKCS #1 sign/verify with hash OID. (***TESTING NEEDED)
 
  o Implement the defined SilcDH API.  The definition is in
index 2dbd9bdd11e15b80dc50ab4b42acea09b014b0a7..221edd9a8455308878883966850b32f2e9da8715 100644 (file)
@@ -179,7 +179,7 @@ AC_CHECK_FUNCS(poll select listen bind shutdown close connect setsockopt)
 AC_CHECK_FUNCS(setrlimit time ctime utime gettimeofday getrusage)
 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
 AC_CHECK_FUNCS(setrlimit time ctime utime gettimeofday getrusage)
 AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
-AC_CHECK_FUNCS(setgroups initgroups nl_langinfo epoll_wait)
+AC_CHECK_FUNCS(setgroups initgroups nl_langinfo epoll_wait nanosleep)
 AC_CHECK_FUNCS(strchr snprintf strstr strcpy strncpy memcpy memset memmove)
 
 #ifdef SILC_DIST_SIM
 AC_CHECK_FUNCS(strchr snprintf strstr strcpy strncpy memcpy memset memmove)
 
 #ifdef SILC_DIST_SIM
index 20ba26776bed7126d61fcc32781e8c8d9704b2bc..1751f47ad261b7525fc9e31d10a440d6dc98711a 100644 (file)
@@ -209,9 +209,11 @@ safely ignore it when received.
 <td><small>
 Sent when a server quits the network.  The 'clients' is a list of
 SilcClientEntry pointers.  Each client in the entry is one client signing
 <td><small>
 Sent when a server quits the network.  The 'clients' is a list of
 SilcClientEntry pointers.  Each client in the entry is one client signing
-off from the SILC network.  The library will free the list.
+off from the SILC network.  The library will free the list.  The `server'
+is the quitting server, and it is NULL if the server isn't cached in the
+client library.
 </td>
 </td>
-<td width="50%"><small>NULL, SilcClientEntry *clients, SilcUInt32 clients_count
+<td width="50%"><small>SilcServerEntry server, SilcDList clients
 </td>
 </tr>
 
 </td>
 </tr>
 
index 1b4da6186a2262cc84784ca76b5a8da702399370..4b1a732bd478f4079d5cdc708756cdf6936a788e 100644 (file)
@@ -11,7 +11,7 @@ typedef struct {
 #define MAX_ROUND 8
 #define MAX_MUL 4
 #define MAX_THREADS 4
 #define MAX_ROUND 8
 #define MAX_MUL 4
 #define MAX_THREADS 4
-#define MAX_LOCKS 271234567
+#define MAX_LOCKS 471234567
 
 SilcMutex mutex;
 SilcUInt64 cpu_freq = 0;
 
 SilcMutex mutex;
 SilcUInt64 cpu_freq = 0;
@@ -90,13 +90,9 @@ void *mutex_thread_hold(void *context)
     silc_mutex_lock(mutex);
     hval2 = i;
     hval3 = 0;
     silc_mutex_lock(mutex);
     hval2 = i;
     hval3 = 0;
-    hval += hval;
+    hval++;
     hval3 = hval2 + i;
     hval3 = hval2 + i;
-    if (hval > max_locks)
-      hval = 0;
-    if (hval < max_locks)
-      hval = max_locks;
-    hval += hval;
+    hval += hval2;
     hval3 += hval;
     if (silc_unlikely(hval3 != hval2 + i + hval)) {
       fprintf(stderr, "MUTEX CORRUPT 1\n");
     hval3 += hval;
     if (silc_unlikely(hval3 != hval2 + i + hval)) {
       fprintf(stderr, "MUTEX CORRUPT 1\n");
@@ -179,8 +175,9 @@ int main(int argc, char **argv)
 
   fprintf(stderr, "Spinning/holding lock, lock/unlock per second\n");
 
 
   fprintf(stderr, "Spinning/holding lock, lock/unlock per second\n");
 
-  sleep(16);
-  for (j = 0; j < MAX_ROUND; j++) {
+  max_locks /= 2;
+  sleep(5);
+  for (j = 0; j < MAX_ROUND / 2; j++) {
     for (i = 0; i < 1; i++)
       c[i].thread = silc_thread_create(mutex_thread_hold, &c[i], TRUE);
 
     for (i = 0; i < 1; i++)
       c[i].thread = silc_thread_create(mutex_thread_hold, &c[i], TRUE);
 
@@ -190,32 +187,32 @@ int main(int argc, char **argv)
       val += c[i].time;
     }
     fprintf(stderr, "%llu mutex lock/unlock per second (%d threads)\n",
       val += c[i].time;
     }
     fprintf(stderr, "%llu mutex lock/unlock per second (%d threads)\n",
-                     (1000LL * (max_locks / 4)) / val, 1);
+                      (1000LL * (max_locks / 4) * 1) / val, 1);
   }
   puts("");
 
   max_locks2 = max_locks;
   }
   puts("");
 
   max_locks2 = max_locks;
+  max_locks2 /= 2;
   for (k = 0; k < MAX_MUL; k++) {
   for (k = 0; k < MAX_MUL; k++) {
-    sleep(16);
+    sleep(2);
     max_locks = max_locks2 / (k + 1);
     max_locks = max_locks2 / (k + 1);
-    for (j = 0; j < MAX_ROUND; j++) {
+    for (j = 0; j < MAX_ROUND / 2; j++) {
       hval = hval2 = 1;
       for (i = 0; i < MAX_THREADS * (k + 1); i++)
       hval = hval2 = 1;
       for (i = 0; i < MAX_THREADS * (k + 1); i++)
-       c[i].thread = silc_thread_create(mutex_thread, &c[i], TRUE);
+        c[i].thread = silc_thread_create(mutex_thread_hold, &c[i], TRUE);
 
       val = 0;
       for (i = 0; i < MAX_THREADS * (k + 1); i++) {
 
       val = 0;
       for (i = 0; i < MAX_THREADS * (k + 1); i++) {
-       silc_thread_wait(c[i].thread, NULL);
-       val += c[i].time;
+        silc_thread_wait(c[i].thread, NULL);
+        val += c[i].time;
       }
       fprintf(stderr, "%llu mutex lock/unlock per second (%d threads)\n",
       }
       fprintf(stderr, "%llu mutex lock/unlock per second (%d threads)\n",
-                     (1000LL * (max_locks / 4) *
-                      (MAX_THREADS * (k + 1))) / val,
-                     MAX_THREADS * (k + 1));
+                      (1000LL * (max_locks / 4) *
+                       (MAX_THREADS * (k + 1))) / val,
+                      MAX_THREADS * (k + 1));
     }
     puts("");
   }
     }
     puts("");
   }
-  max_locks = max_locks2;
 
   success = TRUE;
 
 
   success = TRUE;