Le lundi 17 mai 2010 11:04:02, Andrew a écrit :
> > I would be very pleased to propose you some test and patches to see how
> > we can  fix this issue. Are you able to test patches ?
> 
> Sure thing. Send them along and I'll test them out.

Can you test the attached patch ? It has to be applied in ocaml-cry/src and 
was already commited if you use the SVN..

Romain
Index: cry.ml
===================================================================
--- cry.ml	(révision 7242)
+++ cry.ml	(copie de travail)
@@ -315,9 +315,12 @@
   let len = String.length request in
   let rec write ofs =
     let rem = len - ofs in
-    let ret = Unix.write socket request ofs rem in
-    if ret < rem then
-      write (ofs+ret)
+    if rem > 0 then
+      let ret = Unix.write socket request ofs rem in
+      if ret = 0 then
+        raise (Error Write) ;
+      if ret < rem then
+        write (ofs+ret)
   in
   try
     write 0
------------------------------------------------------------------------------

_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to