diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-03-09 19:54:33 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-03-09 19:54:33 +0100 |
commit | 0aa5b01fab130618fa63e9a6684265904a9f98b5 (patch) | |
tree | d65eac728b3167e3e9e539f07bf28d5636aefffc /sys | |
parent | 9dc9c6c5ef8bba195778f7701142af602e457665 (diff) |
devtls: fix wrong iounit
devtls writes are only atomic up to MaxRecLen as this is the
maximum payload size we put in a record application message.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/9/port/devtls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/9/port/devtls.c b/sys/src/9/port/devtls.c index 2b5cc9304..93bd8225e 100644 --- a/sys/src/9/port/devtls.c +++ b/sys/src/9/port/devtls.c @@ -499,7 +499,7 @@ tlsopen(Chan *c, int omode) c->mode = openmode(omode); c->flag |= COPEN; c->offset = 0; - c->iounit = qiomaxatomic; + c->iounit = MaxRecLen; return c; } @@ -1584,8 +1584,8 @@ tlswrite(Chan *c, void *a, long n, vlong off) e = p + n; do{ m = e - p; - if(m > MaxRecLen) - m = MaxRecLen; + if(m > c->iounit) + m = c->iounit; b = allocb(m); if(waserror()){ |