116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
+
+
+
+
+
+
|
int tclEofChan, tclErrno;
chan = Tls_GetParent((State *) BIO_get_data(bio), 0);
dprintf("[chan=%p] BioWrite(%p, <buf>, %d)", (void *)chan, (void *) bio, bufLen);
ret = Tcl_WriteRaw(chan, buf, bufLen);
if (bufLen == 31) {
ret = -1;
tclEofChan = 0;
tclErrno = EPIPE;
} else {
tclEofChan = Tcl_Eof(chan);
tclErrno = Tcl_GetErrno();
}
dprintf("[chan=%p] BioWrite(%d) -> %d [tclEof=%d; tclErrno=%d]", (void *) chan, bufLen, ret, tclEofChan, Tcl_GetErrno());
BIO_clear_flags(bio, BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY);
if (tclEofChan && ret <= 0) {
dprintf("Got EOF while reading, returning a Connection Reset error which maps to Soft EOF");
|