aboutsummaryrefslogtreecommitdiff
path: root/net/quagga/files/patch-bgpd::bgp_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/quagga/files/patch-bgpd::bgp_packet.c')
-rw-r--r--net/quagga/files/patch-bgpd::bgp_packet.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/quagga/files/patch-bgpd::bgp_packet.c b/net/quagga/files/patch-bgpd::bgp_packet.c
new file mode 100644
index 000000000000..c54a139301a7
--- /dev/null
+++ b/net/quagga/files/patch-bgpd::bgp_packet.c
@@ -0,0 +1,25 @@
+--- bgpd/bgp_packet.c.orig Mon Nov 22 15:31:07 2004
++++ bgpd/bgp_packet.c Mon Nov 22 15:31:40 2004
+@@ -566,17 +566,22 @@
+ while (1)
+ {
+ int writenum;
++ int val;
+
+ s = bgp_write_packet (peer);
+ if (! s)
+ return 0;
+
++ val = fcntl (peer->fd, F_GETFL, 0);
++ fcntl (peer->fd, F_SETFL, val|O_NONBLOCK);
++
+ /* Number of bytes to be sent. */
+ writenum = stream_get_endp (s) - stream_get_getp (s);
+
+ /* Call write() system call. */
+ num = write (peer->fd, STREAM_PNT (s), writenum);
+ write_errno = errno;
++ fcntl (peer->fd, F_SETFL, val);
+ if (num <= 0)
+ {
+ /* Partial write. */