Skip to content
Tcl Source Code History Of Ticket 557878ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 557878ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 557878ffffffffffffffffffffffffffffffffff

  1. Ticket change [98a3905baf] (rid 110644) by nobody on 2002-05-19 06:18:41:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The bug affects Tcl 8.3.2 - 8.4a5  When a server 
      socket is created and "fconfigure $sock -encoding 
      binary" is used the server fails to call the proc 
      specified in the socket -server command.  The end 
      result is that client sockets fail to be able to 
      connect.  This problem doesn't affect Unix-like 
      (OpenBSD 3.0) systems from the tests that I've run.  
      I and another person were able to verify that it 
      fails in Windows.  I tested it with Windows XP.
      
      Now, I know that fconfiguring a server socket is 
      apparently pointless as DKF put it I believe, but it 
      is a bug nonetheless.
      
    4. foundin initialized to: "obsolete: 8.4a5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "server fails with -encoding binary"
    11. type initialized to: "Bug"
  2. Ticket change [5ddf97443d] (rid 115542) by dkf on 2002-05-20 16:26:52:

    1. assignee changed to: "andreas_kupries"
    2. subsystem changed to: "25. Channel System"
  3. Ticket change [b00279b236] (rid 97914) by dgp on 2002-05-21 01:50:51:

    1. subsystem changed to: "27. Channel Types"
  4. Ticket change [fa8dd58ee6] (rid 91895) by andreas_kupries on 2002-05-22 00:25:32:

    1. priority changed to: "7 High"
  5. Ticket change [bc86485c2f] (rid 101764) by andreas_kupries on 2002-05-22 01:28:55:

    1. priority changed to: "8"
  6. Ticket change [991424b1eb] (rid 110724) by andreas_kupries on 2002-05-25 00:32:33:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Confirmed for Win2K.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  7. Ticket change [a0f291b283] (rid 96898) by andreas_kupries on 2002-05-25 00:35:41:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Actually setting any encoding, even the encoding reported 
      back by fconfigure will cause the problem. In other words, the 
      problem is not so much in the specific encoding chosen, but 
      the act of performing the reconfiguration of the server socket.
      
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  8. Ticket change [217985b200] (rid 130588) by andreas_kupries on 2002-05-25 01:26:58:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Yep. What happens is this: When the server socket is 
      reconfigured the system will call TcpWatchProc in 
      tclWinSock.c to update for which events to look. Adding 
      some tracing statements to this routine we see:
      
      $ ./bin/tclsh84s.exe
      % fconfigure [set a [socket -server hoo 0]] -sockname
      0.0.0.0 0.0.0.0 1143
      % fconfigure $a -encoding 1143
      unknown encoding "1143"
      % fconfigure $a -encoding binary
      FD_READ    = 001
      FD_WRITE   = 002
      FD_CLOSE   = 032
      FD_ACCEPT  = 008
      FD_CONNECT = 016
      watch      = 008
      select     = 008
      watch/new  = 000
      select/new = 008
      
      watch determines which events are watched by windows for 
      the handle, and ACCEPT is the event sent if a new 
      connection arrives on the socket. As we can see the 
      ACCEPT is cleared completely. This is because the server 
      socket is neither readable nor writable.
      
      Unix systems are not affected because they check if an 
      acceptProc is set (tclUnixChan.c, line 2354, TcpWatchProc) 
      and avoid messing with the masks and events if that it so.
      
      We have to perform the same check for Windows.
      
      The mechanism on Mac is unclear. This means that this
      report has to be given to the mac maintainers to make sure
      that this bug is not present for that platform too.
      
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  9. Ticket change [bf93297065] (rid 102272) by andreas_kupries on 2002-05-25 01:54:30:

    1. icomment:
      
      
      File Added - 23688: 557878.diff
      
      Logged In: YES 
      user_id=75003
      
      Attaching a patch.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. resolution changed to: "Fixed"
    5. username: "andreas_kupries"
  10. Add attachment "557878.diff" [9af03b02bc] (rid 111038) by andreas_kupries on 2002-05-25 01:54:30.

  11. Ticket change [ca46cbb709] (rid 122437) by andreas_kupries on 2002-05-25 02:06:07:

    1. closedate changed to: "2002-05-24T19:06:07"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Patch committed.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "andreas_kupries"