summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/packet.c b/packet.c
index fe3eea094..fca0075e7 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.113 2004/05/11 19:01:43 deraadt Exp $"); 40RCSID("$OpenBSD: packet.c,v 1.114 2004/06/14 01:44:39 djm Exp $");
41 41
42#include "openbsd-compat/sys-queue.h" 42#include "openbsd-compat/sys-queue.h"
43 43
@@ -319,13 +319,10 @@ void
319packet_set_nonblocking(void) 319packet_set_nonblocking(void)
320{ 320{
321 /* Set the socket into non-blocking mode. */ 321 /* Set the socket into non-blocking mode. */
322 if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0) 322 set_nonblock(connection_in);
323 error("fcntl O_NONBLOCK: %.100s", strerror(errno));
324 323
325 if (connection_out != connection_in) { 324 if (connection_out != connection_in)
326 if (fcntl(connection_out, F_SETFL, O_NONBLOCK) < 0) 325 set_nonblock(connection_out);
327 error("fcntl O_NONBLOCK: %.100s", strerror(errno));
328 }
329} 326}
330 327
331/* Returns the socket used for reading. */ 328/* Returns the socket used for reading. */