Fixed outoing packet queue handling bug on very high load.
[silc.git] / lib / silcutil / beos / silcbeossockconn.c
index 3b7c057cf5c830ceca2b386fc27daf9282f2d867..0786f8b01cf7941b1e81e00c83328be106c1eb95 100644 (file)
@@ -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);
   }
 
@@ -110,7 +117,7 @@ int silc_socket_read(SilcSocketConnection sock)
 /* Returns human readable socket error message */
 
 bool silc_socket_get_error(SilcSocketConnection sock, char *error,
-                          uint32 error_len)
+                          SilcUInt32 error_len)
 {
   char *err;