Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Subject: [gdbserver] SO_KEEPALIVE is being set on wrong socket.
Date: Sun, 08 Jul 2007 01:22:00 -0000	[thread overview]
Message-ID: <46903B28.2020001@portugalmail.pt> (raw)

[-- Attachment #1: Type: text/plain, Size: 89 bytes --]

Hi,

I noticed that SO_KEEPALIVE is being set on the wrong socket.

Cheers,
Pedro Alves


[-- Attachment #2: keep_alive.diff --]
[-- Type: text/x-diff, Size: 894 bytes --]

2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>

	* 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. */


             reply	other threads:[~2007-07-08  1:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08  1:22 Pedro Alves [this message]
2007-07-17 13:01 ` Daniel Jacobowitz
2007-07-18 18:55   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46903B28.2020001@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox