[joey] I found a couple of bugs in Joey

  • From: "Keith Willis" <kwillis@xxxxxxxxxxxxxxxxxxxxx>
  • To: <joey@xxxxxxxxxxxxx>
  • Date: Wed, 28 Jan 2004 13:52:30 -0500

All,
 
I have found a couple of bugs in Joey.
 
1.  If a user has subscribed to their self, When disconnecting, you will hit
an endless loop trying to send everyone your presence information as
offline.
    a.  I have fixed this problem by checking to see if the message is
coming from the same user that it is going to. If it is, I ignore it.
 
Here is the code (It is found in the JabberUser.vb file):
 
    Public Sub sendPresenceToAll(ByVal myMessage As Xml.XmlElement, ByVal
IncludeDirected As Boolean)
        Dim myTo As jabber.JID
        Dim myFrom As String =
myMessage.GetAttribute("from").ToString().Split("/")(0)
 
        For Each myTo In Subscriptions.From.Values
            If myTo.ToString() <> myFrom Then
                myMessage.SetAttribute("to", myTo.ToString)
                myJSM.deliverMessage(myMessage)
            End If
        Next
 
        If IncludeDirected Then
            Dim sendTo As String
 
            For Each sendTo In DirectedPresence
                myMessage.SetAttribute("to", sendTo)
                myJSM.deliverMessage(myMessage)
            Next
        End If
    End Sub
Are there any problems with this?  Typically a user would not need to add
their self to their list or presence information to theirself.
 
2.  I am having a problem logging off.  The client I am using is called
Coccinella.  It was written in TCL.  I logoff, and the client disconnects,
but everytime I try to log back in, it says that another user is already
logged in using that id.  I would like to implement functionality similar to
MSN where if you are logged in at one location, and you try to log in again
at a different location, it signs the first one out and signs the second one
in.  
 
Has anyone done this or attempted this?  I found the code that checks to see
if the resource is being used, but I haven't been able to find out how to
raise the disconnect user method.
 
Any help that you can provide for this would be greatly appreciated.
 
Enhancements that would be great to see.
 
There is one additional functionality piece that would be good to add to the
Joey server.  The ability to accept connections from Flash.  There are some
good Flash open source iniciatives going on, but this will require some
changes to Joey.  
 
From what I have seen so far, here are the things that need to be added:
 
    1.  Flash needs an additional namespace to be added.  Instead of using
stream:stream, it uses flash:stream.  
    2.  The flash streams need to be null terminated.  
        a.  What this exactly means, I am trying to figure out.  I know what
null termination is, but I want to find out 
            if it is each message that is sent to the clients that needs to
be null terminated, or if it is only the 
            </flash:stream> that needs to be null terminated.
 
If anyone knows the answers to these, I would appreciate some feedback.
 
Thanks,
 
Keith Willis



Other related posts:

  • » [joey] I found a couple of bugs in Joey