~ubuntu-branches/ubuntu/quantal/libssh/quantal-security

« back to all changes in this revision

Viewing changes to debian/patches/0001-socket.c-Fixed-setting-max_fd-which-breaks-ssh_selec.patch

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2010-10-20 20:45:48 UTC
  • mfrom: (4.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20101020204548-vg0mfn5dnd9zpo2b
Tags: 0.4.5-2
* Add d/p/0001-socket.c-Fixed-setting-max_fd-which-breaks-ssh_selec.patch:
  Fix slow response in Remmina SSH (Closes: #599687, LP: #663777)
* debian/control: Bump Standards-Version to 3.9.1 (no futher changes)
* debian/copyright: Update copyright file to please lintian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Vic Lee <llyzs@163.com>
 
2
Date: Mon, 20 Sep 2010 16:32:08 +0000
 
3
Subject: [PATCH] socket.c: Fixed setting max_fd which breaks ssh_select().
 
4
 
 
5
Signed-off-by: Andreas Schneider <asn@cynapses.org>
 
6
---
 
7
 libssh/socket.c |    5 ++++-
 
8
 1 files changed, 4 insertions(+), 1 deletions(-)
 
9
 
 
10
diff --git a/libssh/socket.c b/libssh/socket.c
 
11
index 402a5b7..02db660 100644
 
12
--- a/libssh/socket.c
 
13
+++ b/libssh/socket.c
 
14
@@ -257,7 +257,10 @@ void ssh_socket_fd_set(struct socket *s, fd_set *set, socket_t *max_fd) {
 
15
   if (s->fd == SSH_INVALID_SOCKET)
 
16
     return;
 
17
   FD_SET(s->fd,set);
 
18
-  if (s->fd >= 0 && s->fd != SSH_INVALID_SOCKET) {
 
19
+
 
20
+  if (s->fd >= 0 &&
 
21
+      s->fd >= *max_fd &&
 
22
+      s->fd != SSH_INVALID_SOCKET) {
 
23
     *max_fd = s->fd + 1;
 
24
   }
 
25
 }
 
26
--