Skip to content
Tcl Source Code History Of Ticket 218696
Login

History Of Ticket 218696

Artifacts Associated With Ticket 218696

  1. Ticket change [792f167477] (rid 90087) by nobody on 2000-10-26 01:04:13:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 1776 Bug
      Version: 8.0.5
      SubmitDate: '1999-04-09'
      LastModified: '1999-04-12'
      Severity: CRIT
      Status: Released
      Submitter: pat
      ChangedBy: pat
      RelatedBugIDs: 1664
      OS: Windows NT
      OSVersion: 4.0 SP3
      Machine: X86
      FixedDate: '1999-04-13'
      FixedInVersion: 8.1b3
      ClosedDate: '2000-10-25'
      
      
      Name:
      Dennis Parker
      
      Extensions:
      none
      
      CustomShell:
      none besides above fix
      
      ReproducibleScript:
      This is the same problem reported in a previous bug submission (by
          someone
          else) with this text:
          
          
          Tcl 8.0.5 Bug:  Generated by Scriptics' bug entry form at
                  http://www.scriptics.com/support/bugForm.html
          Responses to this post are encouraged.
          ------
          
          Submitted by:  mo
          OperatingSystem:  Windows NT
          OperatingSystemVersion:  4.0 SP3
          Synopsis:  socket -async combined with fileevent does not work under NT
          
          ReproducibleScript:
              set server ftp.netscape.com
              set port   12345
              
              if {[catch {
                set sock [socket -async $server $port]
              } err]} {
                puts "socket -async connect error 1 \"$err\""
              }
              
              # define fileevent callback
              
              proc firstWritable { sock } {
                # remove writable fileevent handler
                fileevent $sock writable {}
                
                #find out if the connection worked by testing the -peername
              
                if [catch {fconfigure $sock -peername} peerinfo] {
                  close $sock
                  puts "socket -async connect error 2 \"$peerinfo\""
                } else {
                  puts "socket -async connect worked"
                }
              }
              
              # set up file event on the socket so we know
              # when it connects (or fails to connect)
              
              fileevent $sock writable "firstWritable $sock"
              
              
          
          ObservedBehavior:
              The writable fileevent callback is never triggered under NT.
              This same code works perfectly under Unix systems.
              
          
          DesiredBehavior:
              I need to be able to test to see if the async socket
              connect worked using the writable fileevent. There is
              simply no other way to check the status of the socket
              without doing a read on the socket and doing a read
              on the socket is not an option because the program
              can not block Tk events during a network operation.
              
          
          Comments:
              I also tested this under Tcl 8.1b2 and it does not solve
              this problem either.
      
      Patch:
      1152d1151
      <     if (infoPtr->flags & SOCKET_ASYNC_CONNECT) 
      1389a1389
      > 
      2003,2011c2003
      <     if(infoPtr->flags & SOCKET_ASYNC_CONNECT) {
      <           infoPtr->flags &= ~(SOCKET_ASYNC_CONNECT);
      < if (error != ERROR_SUCCESS) {
      <               TclWinConvertWSAError(error);
      <               infoPtr->lastError = Tcl_GetErrno();
      < }
      < infoPtr->readyEvents |= FD_WRITE;
      <     }
      <             infoPtr->readyEvents |= event;
      ---
      >     infoPtr->readyEvents |= event;
      
      PatchFiles:
      TclWinSock.c
      
      
      
      4/13/99 redman - applied patch except the first line of the diff, seems to be left over from something else and was not included with Mo's patch on c.l.t.  Applied for 8.0.6 and 8.1b3
      
      
      
    4. foundin initialized to: "final: 8.0.5"
    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: "63. (unused)"
    10. title initialized to: "Async socket connect hangs"
    11. type initialized to: "Bug"
  2. Ticket change [5632184a2e] (rid 94277) by welch on 2000-10-26 08:27:11:

    1. closedate changed to: "2000-10-26T01:27:11"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [9af6035c2c] (rid 111040) by dgp on 2001-04-01 01:47:41:

    1. subsystem changed to: "27. Channel Types"
  4. Ticket change [622d9c4ac1] (rid 92370) by dgp on 2001-04-01 01:47:45:

    1. closedate changed to: "2001-03-31T18:47:45"
    2. closer changed to: "dgp"