Bugzilla – Attachment 527 Details for
Bug 785
ssh client socket may have O_NONBLOCK flag set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (for non-portable version)
sshconnect.c.patch (text/plain), 731 bytes, created by
Jean-Charles Longuet
on 2004-01-08 13:10:46 AEDT
(
hide
)
Description:
Patch (for non-portable version)
Filename:
MIME Type:
Creator:
Jean-Charles Longuet
Created:
2004-01-08 13:10:46 AEDT
Size:
731 bytes
patch
obsolete
>--- sshconnect.c.ORIG Thu Dec 11 09:24:00 2003 >+++ sshconnect.c Thu Dec 11 09:27:42 2003 >@@ -223,16 +223,21 @@ > struct timeval tv; > socklen_t optlen; > int fdsetsz, optval, rc, result = -1; >+ int flags; > > if (timeout <= 0) > return (connect(sockfd, serv_addr, addrlen)); > >- if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0) >+ flags = fcntl(sockfd, F_GETFL); >+ >+ if (fcntl(sockfd, F_SETFL, flags|O_NONBLOCK) < 0) > return (-1); > > rc = connect(sockfd, serv_addr, addrlen); >- if (rc == 0) >+ if (rc == 0) { >+ fcntl(sockfd, F_SETFL, flags); > return (0); >+ } > if (errno != EINPROGRESS) > return (-1); > >@@ -272,6 +277,7 @@ > errno = optval; > break; > } >+ fcntl(sockfd, F_SETFL, flags); > result = 0; > break; > default:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 785
: 527