History

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.

cinap_lenrek committed 10 years ago

Commit b5e697f1 parent 082f1a31 file · +3 −3Browse files

Unified · Split

kern/devtls.c+3−3
@@ -496,7 +496,7 @@ tlsopen(Chan *c, int omode) · 495 unmodified lines
496496 c->mode = openmode(omode);
497497 c->flag |= COPEN;
498498 c->offset = 0;
499− c->iounit = qiomaxatomic;
499+ c->iounit = MaxRecLen;
500500 return c;
501501 }
502502
@@ -1581,8 +1581,8 @@ tlswrite(Chan *c, void *a, long n, vlong off) · 1078 unmodified lines
15811581 e = p + n;
15821582 do{
15831583 m = e - p;
1584− if(m > MaxRecLen)
1585− m = MaxRecLen;
1584+ if(m > c->iounit)
1585+ m = c->iounit;
15861586
15871587 b = allocb(m);
15881588 if(waserror()){

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t