Artifact
77b95843ac2160facad62327feccd8301a38e46d:
0000: 32 30 30 30 2d 30 36 2d 30 31 20 20 53 63 6f 74 2000-06-01 Scot
0010: 74 20 53 74 61 6e 74 6f 6e 20 20 3c 73 74 61 6e t Stanton <stan
0020: 74 6f 6e 40 73 63 72 69 70 74 69 63 73 2e 63 6f ton@scriptics.co
0030: 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 m>...* tlsIO.c:
0040: 52 65 73 74 6f 72 65 20 74 68 65 20 70 72 65 76 Restore the prev
0050: 69 6f 75 73 20 76 65 72 73 69 6f 6e 2e 20 20 46 ious version. F
0060: 69 78 65 64 20 74 68 65 20 43 6c 6f 73 65 50 72 ixed the ClosePr
0070: 6f 63 20 73 6f 0a 09 69 74 20 75 6e 72 65 67 69 oc so..it unregi
0080: 73 74 65 72 73 20 74 68 65 20 63 68 61 6e 6e 65 sters the channe
0090: 6c 20 68 61 6e 64 6c 65 72 20 6f 6e 20 74 68 65 l handler on the
00a0: 20 73 75 70 65 72 63 65 64 65 64 20 63 68 61 6e superceded chan
00b0: 6e 65 6c 0a 09 69 6e 73 74 65 61 64 20 6f 66 20 nel..instead of
00c0: 74 68 65 20 75 70 70 65 72 20 63 68 61 6e 6e 65 the upper channe
00d0: 6c 2e 20 41 6c 73 6f 20 72 65 6d 6f 76 65 64 20 l. Also removed
00e0: 74 68 65 20 63 61 6c 6c 20 74 6f 0a 09 54 63 6c the call to..Tcl
00f0: 5f 4e 6f 74 69 66 79 43 68 61 6e 6e 65 6c 20 69 _NotifyChannel i
0100: 6e 20 74 68 65 20 43 68 61 6e 6e 65 6c 48 61 6e n the ChannelHan
0110: 64 6c 65 72 20 62 65 63 61 75 73 65 20 74 68 69 dler because thi
0120: 73 20 77 69 6c 6c 20 72 65 73 75 6c 74 0a 09 69 s will result..i
0130: 6e 20 61 6e 20 69 6e 66 69 6e 69 74 65 20 6c 6f n an infinite lo
0140: 6f 70 20 69 66 20 64 61 74 61 20 69 73 20 65 76 op if data is ev
0150: 65 72 20 62 75 66 66 65 72 65 64 20 69 6e 20 74 er buffered in t
0160: 68 65 20 42 49 4f 0a 09 73 74 72 75 63 74 75 72 he BIO..structur
0170: 65 2e 20 5b 42 75 67 3a 20 35 36 32 33 5d 0a 0a e. [Bug: 5623]..
0180: 32 30 30 30 2d 30 35 2d 33 31 20 20 42 72 65 6e 2000-05-31 Bren
0190: 74 20 57 65 6c 63 68 20 3c 77 65 6c 63 68 40 73 t Welch <welch@s
01a0: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 criptics.com>...
01b0: 2a 20 74 6c 73 2e 63 3a 20 43 68 61 6e 67 65 20 * tls.c: Change
01c0: 74 68 65 20 43 68 61 6e 6e 65 6c 48 61 6e 64 6c the ChannelHandl
01d0: 65 72 20 74 6f 20 62 65 20 72 65 67 69 73 74 65 er to be registe
01e0: 72 65 64 20 6f 6e 20 74 68 65 20 6d 61 69 6e 0a red on the main.
01f0: 09 63 68 61 6e 6e 65 6c 20 61 73 20 6f 70 70 73 .channel as opps
0200: 65 64 20 74 6f 20 74 68 65 20 22 70 61 72 65 6e ed to the "paren
0210: 74 22 2c 20 6f 72 20 73 75 70 65 72 63 65 65 64 t", or superceed
0220: 65 64 2c 20 63 68 61 6e 6e 65 6c 2e 20 20 54 68 ed, channel. Th
0230: 69 73 0a 09 69 73 20 62 65 63 61 75 73 65 20 74 is..is because t
0240: 68 65 20 73 6f 63 6b 65 74 20 64 72 69 76 65 72 he socket driver
0250: 20 6e 6f 74 69 66 69 65 73 20 74 68 65 20 6d 61 notifies the ma
0260: 69 6e 20 63 68 61 6e 6e 65 6c 2c 20 61 6e 64 20 in channel, and
0270: 74 68 65 72 65 0a 09 61 72 65 20 74 69 6d 65 73 there..are times
0280: 20 77 69 74 68 20 74 68 65 20 6d 61 69 6e 20 63 with the main c
0290: 68 61 6e 6e 65 6c 20 67 65 74 73 20 63 6c 6f 73 hannel gets clos
02a0: 65 64 2c 20 62 75 74 20 74 68 65 20 73 75 70 65 ed, but the supe
02b0: 72 63 65 64 65 64 0a 09 6f 6e 65 20 69 73 20 6e rceded..one is n
02c0: 6f 74 20 79 65 74 20 63 6c 6f 73 65 64 2e 20 20 ot yet closed.
02d0: 49 66 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 If the channel h
02e0: 61 6e 64 6c 65 72 20 67 65 74 73 20 74 72 69 67 andler gets trig
02f0: 67 65 72 65 64 20 69 6e 0a 09 74 68 69 73 20 68 gered in..this h
0300: 61 6c 66 2d 6f 70 65 6e 20 73 74 61 74 65 20 69 alf-open state i
0310: 74 20 69 73 20 61 73 73 6f 63 69 61 74 65 64 20 t is associated
0320: 77 69 74 68 20 74 68 65 20 73 75 70 65 72 63 65 with the superce
0330: 65 64 65 64 0a 09 63 68 61 6e 6e 65 64 6c 2c 20 eded..channedl,
0340: 62 75 74 20 75 73 65 73 20 69 74 73 20 70 72 69 but uses its pri
0350: 76 61 74 65 20 70 6f 69 6e 74 65 72 20 74 6f 20 vate pointer to
0360: 74 68 65 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c the main channel
0370: 2c 20 77 68 69 63 68 0a 09 69 73 20 6d 6f 73 74 , which..is most
0380: 6c 79 20 64 65 73 74 72 6f 79 65 64 2e 20 20 45 ly destroyed. E
0390: 6c 69 6d 69 6e 61 74 65 64 20 74 68 65 20 72 65 liminated the re
03a0: 64 75 6e 64 61 6e 74 20 63 61 6c 6c 20 74 6f 0a dundant call to.
03b0: 09 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e .Tcl_NotifyChann
03c0: 65 6c 20 66 72 6f 6d 20 54 6c 73 57 61 74 63 68 el from TlsWatch
03d0: 50 72 6f 63 2e 20 5b 42 75 67 3a 20 35 36 32 33 Proc. [Bug: 5623
03e0: 5d 0a ].