updates.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 19 Jul 2001 08:39:04 +0000 (08:39 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 19 Jul 2001 08:39:04 +0000 (08:39 +0000)
includes/silcincludes.h
lib/silcclient/client.h
lib/silcutil/silclog.c
lib/silcutil/win32/silcwin32schedule.c

index 20855d040a400dec80bb67924d81ce809e423c04..fb326df689f59040726fb78fd1bcd5012f874d70 100644 (file)
@@ -176,19 +176,23 @@ typedef unsigned long uint32;
 typedef signed long int32;
 #else
 #if SILC_SIZEOF_LONG_LONG >= 4
+#ifndef WIN32
 typedef unsigned long long uint32;
 typedef signed long long int32;
 #endif
 #endif
 #endif
+#endif
 
 #if SILC_SIZEOF_LONG >= 8
 typedef unsigned long uint64;
 typedef signed long int64;
 #else
 #if SILC_SIZEOF_LONG_LONG >= 8
+#ifndef WIN32
 typedef unsigned long long uint64;
 typedef signed long long int64;
+#endif
 #else
 typedef uint32 uint64;
 typedef int32 int64;
index 89195d053d4372157a05e9091eff51197dbdbb88..f78135f53a79528c1cb178d18f2de33b21af1162 100644 (file)
@@ -282,7 +282,7 @@ void silc_client_remove_from_channels(SilcClient client,
 void silc_client_replace_from_channels(SilcClient client, 
                                       SilcClientConnection conn,
                                       SilcClientEntry old,
-                                      SilcClientEntry new);
+                                      SilcClientEntry newclient);
 void silc_client_process_failure(SilcClient client,
                                 SilcSocketConnection sock,
                                 SilcPacketContext *packet);
index 91b254d508b90ec63960eec19d7ad3c8e2c96ae5..a0c9181a7f72a93a8f2b80931aa3ea11b05f057c 100644 (file)
@@ -95,6 +95,9 @@ void silc_log_output(const char *filename, uint32 maxsize,
       break;
     }
 
+  if (!filename)
+    filename = " ";
+
   /* Purge the log file if the max size is defined. */
   if (maxsize) {
     fp = fopen(filename, "r");
index 9321fecb823d33a1ac5f3378781229ff527163d4..4c8351467c80551f98bba809509d74ba57dff24f 100644 (file)
@@ -20,7 +20,7 @@
 /* $Id$ */
 
 #include "silcincludes.h"
-#includd "silcschedule_i.h"
+#include "silcschedule_i.h"
 
 /* Our "select()" for WIN32. This mimics the behaviour of select() system
    call. It does not call the Winsock's select() though. Its functions
@@ -65,10 +65,13 @@ int silc_select(SilcScheduleFd fds, uint32 fds_count, struct timeval *timeout)
       continue;
 
     if (fds[i].events & SILC_TASK_READ)
-      handles[nhandles++] = (HANDLE)i;
+      handles[nhandles++] = (HANDLE)fds[i].fd;
 
-    if (fds[i].events & SILC_TASK_WRITE)
+    /* If writing then just set the bit and return */
+    if (fds[i].events & SILC_TASK_WRITE) {
+      fds[i].revents = SILC_TASK_WRITE;
       return 1;
+    }
 
     fds[i].revents = 0;
   }
@@ -140,8 +143,7 @@ int silc_select(SilcScheduleFd fds, uint32 fds_count, struct timeval *timeout)
 
     /* Give the wait another try */
    goto retry;
-  } else if (ready >= WAIT_OBJECT_0 && ready < WAIT_OBJECT_0 + nhandles &&
-            readfds) {
+  } else if (ready >= WAIT_OBJECT_0 && ready < WAIT_OBJECT_0 + nhandles) {
     /* Some other event, like SOCKET or something. */
 
     /* Go through all fds even though only one was set. This is to avoid