ref: b5e697fda5842e1bf9016b983dfbff17f53683f6
parent: 082f1a3a980c79b96009f413b72f65b791cc2352
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Mar 9 14:54:50 EST 2016
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.
--- a/kern/devtls.c
+++ b/kern/devtls.c
@@ -496,7 +496,7 @@
c->mode = openmode(omode);
c->flag |= COPEN;
c->offset = 0;
- c->iounit = qiomaxatomic;
+ c->iounit = MaxRecLen;
return c;
}
@@ -1581,8 +1581,8 @@
e = p + n;
do{
m = e - p;
- if(m > MaxRecLen)
- m = MaxRecLen;
+ if(m > c->iounit)
+ m = c->iounit;
b = allocb(m);
if(waserror()){