summaryrefslogtreecommitdiff
path: root/src/server/telnet_server.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-09-27 08:26:31 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-10-01 10:21:33 +0200
commit5a41435e45ae18c0823780382c214fb7324dbe7d (patch)
treecc9aa3f6c884328dcb4fbc969a7ba45b09ed8282 /src/server/telnet_server.c
parenta60a57d8ed1cb28de1eca0e2d6d78d70bd873663 (diff)
downloadopenocd+libswd-5a41435e45ae18c0823780382c214fb7324dbe7d.tar.gz
openocd+libswd-5a41435e45ae18c0823780382c214fb7324dbe7d.tar.bz2
openocd+libswd-5a41435e45ae18c0823780382c214fb7324dbe7d.tar.xz
openocd+libswd-5a41435e45ae18c0823780382c214fb7324dbe7d.zip
server: split file descriptors in in/out fd's
pipes have different fd's for in/out. This makes the code more orthogonal and prepares for adding pipes. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/server/telnet_server.c')
-rw-r--r--src/server/telnet_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c
index 10caee31..92052ae8 100644
--- a/src/server/telnet_server.c
+++ b/src/server/telnet_server.c
@@ -2,7 +2,7 @@
* Copyright (C) 2005 by Dominic Rath *
* Dominic.Rath@gmx.de *
* *
- * Copyright (C) 2007,2008 Øyvind Harboe *
+ * Copyright (C) 2007-2010 Øyvind Harboe *
* oyvind.harboe@zylin.com *
* *
* Copyright (C) 2008 by Spencer Oliver *
@@ -51,7 +51,7 @@ static int telnet_write(struct connection *connection, const void *data,
if (t_con->closed)
return ERROR_SERVER_REMOTE_CLOSED;
- if (write_socket(connection->fd, data, len) == len)
+ if (write_socket(connection->fd_out, data, len) == len)
{
return ERROR_OK;
}