summaryrefslogtreecommitdiffhomepage
path: root/packet.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2008-09-15 12:51:50 +0000
committerMatt Johnston <matt@ucc.asn.au>2008-09-15 12:51:50 +0000
commitb619e88f5481649a480e133494caf27f8880437a (patch)
treed8410822e892282abc5cdcd804db031285fe613c /packet.c
parent460bf4382257a262fda862f66d6fe97c749f5bb7 (diff)
- Split main socket var into ses.sock_in/ses.sock_out in preparation
for -J proxy_cmd option (and some prelim options for that) --HG-- extra : convert_revision : 47cdea9a7d66c553c6f5eec43b899821939d4e4c
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index c559dab..30f4758 100644
--- a/packet.c
+++ b/packet.c
@@ -61,7 +61,7 @@ void write_packet() {
len = writebuf->len - writebuf->pos;
dropbear_assert(len > 0);
/* Try to write as much as possible */
- written = write(ses.sock, buf_getptr(writebuf, len), len);
+ written = write(ses.sock_out, buf_getptr(writebuf, len), len);
if (written < 0) {
if (errno == EINTR) {
@@ -122,7 +122,7 @@ void read_packet() {
* mightn't be any available (EAGAIN) */
dropbear_assert(ses.readbuf != NULL);
maxlen = ses.readbuf->len - ses.readbuf->pos;
- len = read(ses.sock, buf_getptr(ses.readbuf, maxlen), maxlen);
+ len = read(ses.sock_in, buf_getptr(ses.readbuf, maxlen), maxlen);
if (len == 0) {
ses.remoteclosed();
@@ -171,7 +171,7 @@ static void read_packet_init() {
maxlen = blocksize - ses.readbuf->pos;
/* read the rest of the packet if possible */
- len = read(ses.sock, buf_getwriteptr(ses.readbuf, maxlen),
+ len = read(ses.sock_in, buf_getwriteptr(ses.readbuf, maxlen),
maxlen);
if (len == 0) {
ses.remoteclosed();