Added SILC Thread Queue API
[silc.git] / lib / silcutil / beos / silcbeossockconn.c
index 3b26deec127abe927e45526c0714f5ba7f0f33b2..875442cb0a9da313371e79ac429a790361dce553 100644 (file)
@@ -22,7 +22,7 @@
 #ifdef SILC_BEOS_BONE
 #include "../unix/silcunixsockconn.c"
 #else
-#include "silcincludes.h"
+#include "silc.h"
 
 /* Writes data from encrypted buffer to the socket connection. If the
    data cannot be written at once, it will be written later with a timeout. 
@@ -52,6 +52,13 @@ int silc_socket_write(SilcSocketConnection sock)
       return -1;
     }
 
+    if (ret < src->len) {
+      SILC_LOG_DEBUG(("Wrote data %d of %d bytes, will write rest later",
+                     ret, src->len));
+      silc_buffer_pull(src, ret);
+      return -2;
+    }
+
     silc_buffer_pull(src, ret);
   }
 
@@ -109,7 +116,7 @@ int silc_socket_read(SilcSocketConnection sock)
 
 /* Returns human readable socket error message */
 
-bool silc_socket_get_error(SilcSocketConnection sock, char *error,
+SilcBool silc_socket_get_error(SilcSocketConnection sock, char *error,
                           SilcUInt32 error_len)
 {
   char *err;