Merged silc_1_0_branch to trunk.
[silc.git] / lib / silcutil / win32 / silcwin32sockconn.c
index 52515bbe82455d7869988cc2039ed0f989754e8f..abc3523721cb9b294314290dfe9e41b93e88d544 100644 (file)
@@ -4,12 +4,11 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2001 Pekka Riikonen
+  Copyright (C) 1997 - 2005 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
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
+  the Free Software Foundation; version 2 of the License.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -33,6 +32,8 @@ int silc_socket_write(SilcSocketConnection sock)
   SOCKET fd = sock->sock;
   SilcBuffer src = sock->outbuf;
 
+  if (!src)
+    return -2;
   if (SILC_IS_DISABLED(sock))
     return -1;