source: trunk/packages/xen-3.1/xen-3.1/tools/ioemu/patches/nodelay-serial-over-tcp @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 897 bytes
Line 
1# HG changeset patch
2# User PeterJohnston <peter.johnston@xensource.com>
3# Node ID b8cc9ffda0a3dc449b026c72c97f78dea2e6f114
4# Parent  a8d2b1393b769048c7b62822e45bef27eef80fb6
5[QEMU] Add TCP_NODELAY to tcp connections exporting serial ports.
6
7Signed-off-by: Steven Smith <sos22@cam.ac.uk>
8
9Index: ioemu/vl.c
10===================================================================
11--- ioemu.orig/vl.c     2007-05-03 10:09:02.000000000 +0100
12+++ ioemu/vl.c  2007-05-03 10:09:03.000000000 +0100
13@@ -2586,6 +2586,7 @@
14     int is_waitconnect = 1;
15     const char *ptr;
16     struct sockaddr_in saddr;
17+    int opt;
18 
19     if (parse_host_port(&saddr, host_str) < 0)
20         goto fail;
21@@ -2654,6 +2655,8 @@
22             }
23         }
24         s->fd = fd;
25+       opt = 1;
26+       setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, sizeof(opt));
27         if (s->connected)
28             tcp_chr_connect(chr);
29         else
Note: See TracBrowser for help on using the repository browser.