From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17750 invoked by alias); 8 Jul 2007 01:22:09 -0000 Received: (qmail 17742 invoked by uid 22791); 8 Jul 2007 01:22:08 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.172) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 08 Jul 2007 01:22:07 +0000 Received: by ug-out-1314.google.com with SMTP id s2so1039868uge for ; Sat, 07 Jul 2007 18:22:06 -0700 (PDT) Received: by 10.67.102.16 with SMTP id e16mr3915571ugm.1183857726437; Sat, 07 Jul 2007 18:22:06 -0700 (PDT) Received: from ?62.169.106.235? ( [62.169.106.235]) by mx.google.com with ESMTP id d26sm8192147nfh.2007.07.07.18.22.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 07 Jul 2007 18:22:05 -0700 (PDT) Message-ID: <46903B28.2020001@portugalmail.pt> Date: Sun, 08 Jul 2007 01:22:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [gdbserver] SO_KEEPALIVE is being set on wrong socket. Content-Type: multipart/mixed; boundary="------------030000000409080000000608" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00131.txt.bz2 This is a multi-part message in MIME format. --------------030000000409080000000608 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 89 Hi, I noticed that SO_KEEPALIVE is being set on the wrong socket. Cheers, Pedro Alves --------------030000000409080000000608 Content-Type: text/x-diff; name="keep_alive.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="keep_alive.diff" Content-length: 894 2007-07-08 Pedro Alves * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc instead of on tmp_desc. --- gdb/gdbserver/remote-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: src/gdb/gdbserver/remote-utils.c =================================================================== --- src.orig/gdb/gdbserver/remote-utils.c 2007-07-07 10:54:48.000000000 +0100 +++ src/gdb/gdbserver/remote-utils.c 2007-07-07 10:55:58.000000000 +0100 @@ -246,7 +246,8 @@ remote_open (char *name) /* Enable TCP keep alive process. */ tmp = 1; - setsockopt (tmp_desc, SOL_SOCKET, SO_KEEPALIVE, (char *) &tmp, sizeof (tmp)); + setsockopt (remote_desc, SOL_SOCKET, SO_KEEPALIVE, + (char *) &tmp, sizeof (tmp)); /* Tell TCP not to delay small packets. This greatly speeds up interactive response. */ --------------030000000409080000000608--