[Tkabber-dev] Issue 1 in tclxmpp: proc xmpp::status is not defined

tclxmpp at googlecode.com tclxmpp at googlecode.com
Thu Sep 23 07:35:09 MSD 2010


Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1 by green.kenneth: proc xmpp::status is not defined
http://code.google.com/p/tclxmpp/issues/detail?id=1

What version of the product are you using? On what operating system?

package provide xmpp 0.1
$Id: xmpp.tcl 142 2010-01-29 15:14:25Z sgolovan $

Please provide any additional information below.

The procedure ::xmpp::status appears to be missing. It is called  
inside :xmpp::free here:

proc ::xmpp::free {xlib} {
     variable $xlib
     upvar 0 $xlib state

     Debug $xlib 2 ""

     if {![status $xlib disconnected]} {
         return -code error [::msgcat::mc "Free without disconnect"]
     }

I have added it and the code for my version is below:

# ::xmpp::status --
#
#       Checks if the status is as expected.
#
# Arguments:
#       xlib            XMPP token.
#       expectedState   One of: connected, disconnected
#
# Result:
#       1 if the status matches the expected value, 0 if not
#
# Side effects:
#       none
#
proc ::xmpp::status {xlib expectedState} {
     upvar 0 $xlib state

     return [string equal -nocase "$state(status)" "$expectedState"]
}



More information about the Tkabber-dev mailing list