summaryrefslogtreecommitdiff
path: root/devel/ORBit2/files
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2001-10-26 13:06:01 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2001-10-26 13:06:01 +0000
commit88fb181c88c61823b302f1b18c5f73fef4892b56 (patch)
treec6e0ed2b76289a3952652aeb45538886dc1a9172 /devel/ORBit2/files
parentInstall the HTML documentation. (diff)
Fix a rather weird incompatibility between ORBit and FreeBSD. It appears that
FreeBSD's writev(2) implementation is rather unreliable when large number of vectors is submitted - it returns EINVAL despite the fact that all arguments are pretty valid. This caused serious problems with GNOME's oaf and prevented Nautilus from working properly. The problem disappeared when I've replaced writev(2) call with appropriate loop based around ordinary write(2). Perhaps this should be investigated and the real source of the problem fixed instead, but I do not have a time for this right now. For those who interested I'm ready to provide a step-by step instruction on how to reproduce the bug. Special thanks to: andersca @ nautilus#irc.gnome.org
Notes
Notes: svn path=/head/; revision=49218
Diffstat (limited to 'devel/ORBit2/files')
-rw-r--r--devel/ORBit2/files/patch-src::IIOP::giop-msg-buffer.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/devel/ORBit2/files/patch-src::IIOP::giop-msg-buffer.c b/devel/ORBit2/files/patch-src::IIOP::giop-msg-buffer.c
new file mode 100644
index 000000000000..a42320410527
--- /dev/null
+++ b/devel/ORBit2/files/patch-src::IIOP::giop-msg-buffer.c
@@ -0,0 +1,24 @@
+
+$FreeBSD$
+
+--- src/IIOP/giop-msg-buffer.c 2001/10/26 12:42:42 1.1
++++ src/IIOP/giop-msg-buffer.c 2001/10/26 12:42:53
+@@ -197,7 +197,17 @@
+ sum);
+ }
+ #endif
+- res = writev(fd, curvec, nvecs);
++ for(sum = 0, t = 0; t < nvecs; t++) {
++ do {
++ res = write(fd, curvec[t].iov_base, curvec[t].iov_len);
++ } while (res < 0 && errno == EAGAIN);
++ if (res < 0) {
++ break;
++ } else
++ sum += res;
++ }
++ if (res >= 0)
++ res = sum;
+
+ sum = (GIOP_MESSAGE_BUFFER(send_buffer)->message_header.message_size + sizeof(GIOPMessageHeader));
+ if(res < sum) {