74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
-
+
-
+
|
* with the SSL library since it will likely be optimized for this.
*/
parentChannel = Tls_GetParent(statePtr, 0);
parentChannelType = Tcl_GetChannelType(parentChannel);
validParentChannelFd = 0;
if (strcmp(parentChannelType->typeName, "tcp") == 0) {
tclGetChannelHandleRet = Tcl_GetChannelHandle(parentChannel, TCL_READABLE, (ClientData) &parentChannelFdIn_p);
tclGetChannelHandleRet = Tcl_GetChannelHandle(parentChannel, TCL_READABLE, &parentChannelFdIn_p);
if (tclGetChannelHandleRet == TCL_OK) {
tclGetChannelHandleRet = Tcl_GetChannelHandle(parentChannel, TCL_WRITABLE, (ClientData) &parentChannelFdOut_p);
tclGetChannelHandleRet = Tcl_GetChannelHandle(parentChannel, TCL_WRITABLE, &parentChannelFdOut_p);
if (tclGetChannelHandleRet == TCL_OK) {
parentChannelFdIn = PTR2INT(parentChannelFdIn_p);
parentChannelFdOut = PTR2INT(parentChannelFdOut_p);
if (parentChannelFdIn == parentChannelFdOut) {
parentChannelFd = parentChannelFdIn;
validParentChannelFd = 1;
}
|
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
-
+
+
+
+
+
|
static long BioCtrl(BIO *bio, int cmd, long num, void *ptr) {
Tcl_Channel chan;
long ret = 1;
chan = Tls_GetParent((State *) BIO_get_data(bio), 0);
dprintf("BioCtrl(%p, 0x%x, 0x%x, %p)", (void *) bio, (unsigned int) cmd, (unsigned int) num, (void *) ptr);
dprintf("BioCtrl(%p, 0x%x, 0x%lx, %p)", bio, cmd, num, ptr);
switch (cmd) {
case BIO_CTRL_RESET:
dprintf("Got BIO_CTRL_RESET");
num = 0;
ret = 0;
break;
case BIO_C_FILE_SEEK:
dprintf("Got BIO_C_FILE_SEEK");
ret = 0;
break;
case BIO_C_FILE_TELL:
dprintf("Got BIO_C_FILE_TELL");
ret = 0;
break;
case BIO_CTRL_INFO:
dprintf("Got BIO_CTRL_INFO");
ret = 1;
|