[Tkabber-dev] [tclxmpp commit] r79 - in trunk: . xmpp

codesite-noreply at google.com codesite-noreply at google.com
Wed Feb 18 16:48:51 MSK 2009


Author: sgolovan
Date: Wed Feb 18 05:13:39 2009
New Revision: 79

Modified:
    trunk/ChangeLog
    trunk/xmpp/https.tcl
    trunk/xmpp/socks4.tcl
    trunk/xmpp/socks5.tcl
    trunk/xmpp/zlib.tcl

Log:
	* xmpp/zlib.tcl: Ignore errors from fconfigure -flush input.

	* xmpp/https.tcl, xmpp/socks4.tcl, xmpp/socks5.tcl: Fixed comments.


Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Wed Feb 18 05:13:39 2009
@@ -1,3 +1,9 @@
+2009-02-18  Sergei Golovan  <sgolovan at nes.ru>
+
+	* xmpp/zlib.tcl: Ignore errors from fconfigure -flush input.
+
+	* xmpp/https.tcl, xmpp/socks4.tcl, xmpp/socks5.tcl: Fixed comments.
+
  2009-02-15  Sergei Golovan  <sgolovan at nes.ru>

  	* xmpp/annotations.tcl, xmpp/bookmarks.tcl, xmpp/delimiter.tcl,

Modified: trunk/xmpp/https.tcl
==============================================================================
--- trunk/xmpp/https.tcl	(original)
+++ trunk/xmpp/https.tcl	Wed Feb 18 05:13:39 2009
@@ -632,8 +632,8 @@
  #
  # Side effects:
  #       If connection is asynchronous then a callback is executed.
-#       Otherwise state(status) is set to allow https::connect to return
-#       with either success or error.
+#       Otherwise state(status) is set to allow ::pconnect::https::connect
+#       to return with either success or error.

  proc ::pconnect::https::Finish {token status {errormsg ""}} {
      variable $token
@@ -679,7 +679,7 @@
  #
  # Side effects:
  #       A debug message is printed to the console if the value of
-#       https::debug variable is not less than num.
+#       ::pconnect::https::debug variable is not less than num.

  proc ::pconnect::https::Debug {token level str} {
      variable debug
@@ -689,19 +689,6 @@
      }

      return
-}
-
-# Test
-if {0} {
-    set s [socket 192.168.0.1 3128]
-    set t [https::connect $s google.com 443]
-    puts $t
-    close $t
-
-    set s [socket 192.168.0.1 3128]
-    set t [https::connect $s google.com 80]
-    puts $t
-    close $t
  }

  # vim:ts=8:sw=4:sts=4:et

Modified: trunk/xmpp/socks4.tcl
==============================================================================
--- trunk/xmpp/socks4.tcl	(original)
+++ trunk/xmpp/socks4.tcl	Wed Feb 18 05:13:39 2009
@@ -267,8 +267,8 @@
  #
  # Side effects:
  #       If connection is asynchronous then a callback is executed.
-#       Otherwise state(status) is set to allow https::connect to return
-#       with either success or error.
+#       Otherwise state(status) is set to allow ::pconnect::socks4::connect
+#       to return with either success or error.

  proc ::pconnect::socks4::Finish {token {errormsg ""}} {
      variable $token
@@ -300,7 +300,7 @@
      return
  }

-# https::Debug --
+# ::pconnect::socks4::Debug --
  #
  #       Prints debug information.
  #
@@ -314,7 +314,7 @@
  #
  # Side effects:
  #       A debug message is printed to the console if the value of
-#       https::debug variable is not less than num.
+#       ::pconnect::socks4::debug variable is not less than num.

  proc ::pconnect::socks4::Debug {token level str} {
      variable debug
@@ -324,12 +324,6 @@
      }

      return
-}
-
-# Test
-if {0} {
-    set s [socket 192.168.0.1 1080]
-    set t [::pconnect::socks4::connect $s jabber.ru 5222 -username sergei]
  }

  # vim:ts=8:sw=4:sts=4:et

Modified: trunk/xmpp/socks5.tcl
==============================================================================
--- trunk/xmpp/socks5.tcl	(original)
+++ trunk/xmpp/socks5.tcl	Wed Feb 18 05:13:39 2009
@@ -584,8 +584,8 @@
  #
  # Side effects:
  #       If connection is asynchronous then a callback is executed.
-#       Otherwise state(status) is set to allow https::connect to return
-#       with either success or error.
+#       Otherwise state(status) is set to allow ::pconnect::socks5::connect
+#       to return with either success or error.

  proc ::pconnect::socks5::Finish {token {errormsg ""}} {
      variable $token
@@ -617,7 +617,7 @@
      return
  }

-# https::Debug --
+# ::pconnect::socks5::Debug --
  #
  #       Prints debug information.
  #
@@ -631,7 +631,7 @@
  #
  # Side effects:
  #       A debug message is printed to the console if the value of
-#       https::debug variable is not less than num.
+#       ::pconnect::socks5::debug variable is not less than num.

  proc ::pconnect::socks5::Debug {token level str} {
      variable debug
@@ -641,25 +641,6 @@
      }

      return
-}
-
-# Test code...
-
-if {0} {
-    # Client
-    proc cb {status socket} {
-        puts "client: status=$status, socket=$socket"
-        if {$status eq "ok"} {
-            fconfigure $socket -buffering none
-            close $socket
-        }
-    }
-    proc dump {} {
-        puts "dump:"
-    }
-    set s [socket 192.168.0.1 1080]
-    #::pconnect::socks5::connect $s jabber.ru 5222 -command cb
-    ::pconnect::socks5::connect $s jabber.ru 5222 -command cb -username  
xxx -password xxx
  }

  # vim:ts=8:sw=4:sts=4:et

Modified: trunk/xmpp/zlib.tcl
==============================================================================
--- trunk/xmpp/zlib.tcl	(original)
+++ trunk/xmpp/zlib.tcl	Wed Feb 18 05:13:39 2009
@@ -467,7 +467,7 @@
      variable $token
      upvar 0 $token state

-    fconfigure $state(sock) -flush input
+    catch {fconfigure $state(sock) -flush input}
      if {[catch {read $state(sock)} msg]} {
          fileevent $state(sock) readable {}
          ::close $state(sock)


More information about the Tkabber-dev mailing list