[Tkabber-dev] [tclxmpp] r133 committed - * xmpp/tcp.tcl, xmpp/tls.tcl, xmpp/zlib.tcl: Fixed aborting underlyin...

tclxmpp at googlecode.com tclxmpp at googlecode.com
Thu Jan 14 21:30:18 MSK 2010


Revision: 133
Author: sgolovan
Date: Thu Jan 14 10:28:40 2010
Log: 	* xmpp/tcp.tcl, xmpp/tls.tcl, xmpp/zlib.tcl: Fixed aborting underlying
	  connection. Fixed connecting in asynchronous mode.

http://code.google.com/p/tclxmpp/source/detail?r=133

Modified:
  /trunk/ChangeLog
  /trunk/xmpp/tcp.tcl
  /trunk/xmpp/tls.tcl
  /trunk/xmpp/zlib.tcl

=======================================
--- /trunk/ChangeLog	Fri Jan  8 05:36:26 2010
+++ /trunk/ChangeLog	Thu Jan 14 10:28:40 2010
@@ -1,3 +1,8 @@
+2010-01-14  Sergei Golovan  <sgolovan at nes.ru>
+
+	* xmpp/tcp.tcl, xmpp/tls.tcl, xmpp/zlib.tcl: Fixed aborting underlying
+	  connection. Fixed connecting in asynchronous mode.
+
  2010-01-08  Sergei Golovan  <sgolovan at nes.ru>

  	* xmpp/compress.tcl, xmpp/starttls.tcl, xmpp/tls.tcl, xmpp/zlib.tcl:
=======================================
--- /trunk/xmpp/tcp.tcl	Tue Dec 29 05:00:26 2009
+++ /trunk/xmpp/tcp.tcl	Thu Jan 14 10:28:40 2010
@@ -143,8 +143,10 @@
      variable $token
      upvar 0 $token state

+    unset state(pconnect)
+
      if {[string equal $status ok]} {
-        unset state(pconnect)
+        set state(sock) $sock
          Configure $token
      } else {
          # Here $sock contains error message
@@ -206,8 +208,10 @@
      variable $token
      upvar 0 $token state

-    # If ::pconnect::abort returns error then propagate it to the caller
-    ::pconnect::abort $state(pconnect)
+    if {[info exists state(pconnect)]} {
+        # If ::pconnect::abort returns error then propagate it to the  
caller
+        ::pconnect::abort $state(pconnect)
+    }

      if {[info exists state(parser)]} {
          ::xmpp::xml::free $state(parser)
=======================================
--- /trunk/xmpp/tls.tcl	Fri Jan  8 05:36:26 2010
+++ /trunk/xmpp/tls.tcl	Thu Jan 14 10:28:40 2010
@@ -177,11 +177,14 @@
  #       If status is ok then a new XML parser is created. In all cases a
  #       callback procedure is executed.

-proc ::xmpp::transport::tls::OpenAux {token cmd status sock} {
+proc ::xmpp::transport::tls::OpenAux {token cmd tlsArgs status sock} {
      variable $token
      upvar 0 $token state

+    unset state(pconnect)
+
      if {[string equal $status ok]} {
+        set state(sock) $sock
          if {[catch {Configure $token $tlsArgs} msg]} {
              set status error
              set token $msg
@@ -332,8 +335,10 @@
      variable $token
      upvar 0 $token state

-    # If ::pconnect::abort returns error then propagate it to the caller
-    ::pconnect::abort $state(pconnect)
+    if {[info exists state(pconnect)]} {
+        # If ::pconnect::abort returns error then propagate it to the  
caller
+        ::pconnect::abort $state(pconnect)
+    }

      if {[info exists state(parser)]} {
          ::xmpp::xml::free $state(parser)
=======================================
--- /trunk/xmpp/zlib.tcl	Fri Jan  8 05:36:26 2010
+++ /trunk/xmpp/zlib.tcl	Thu Jan 14 10:28:40 2010
@@ -174,8 +174,10 @@
      variable $token
      upvar 0 $token state

+    unset state(pconnect)
+
      if {[string equal $status ok]} {
-        unset state(pconnect)
+        set state(sock) $sock
          if {[catch {Configure $token $zlibArgs} msg]} {
              set status error
              set token $msg
@@ -271,8 +273,10 @@
      variable $token
      upvar 0 $token state

-    # If ::pconnect::abort returns error then propagate it to the caller
-    ::pconnect::abort $state(pconnect)
+    if {[info exists state(pconnect)]} {
+        # If ::pconnect::abort returns error then propagate it to the  
caller
+        ::pconnect::abort $state(pconnect)
+    }

      if {[info exists state(parser)]} {
          ::xmpp::xml::free $state(parser)


More information about the Tkabber-dev mailing list