Added SILC Thread Queue API
[silc.git] / lib / silcutil / beos / silcbeossockconn.c
index 3b7c057cf5c830ceca2b386fc27daf9282f2d867..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,8 +116,8 @@ int silc_socket_read(SilcSocketConnection sock)
 
 /* Returns human readable socket error message */
 
-bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len)
+SilcBool silc_socket_get_error(SilcSocketConnection sock, char *error,
+                          SilcUInt32 error_len)
 {
   char *err;