hi.
i found a bug in gloox 1.0alpha2.
when i use mucroomhandler. i found the function
handleMUCParticipantPresence will not be called when
someone join or leave a jabber room.
i find the program code is in mucroom.cpp
void MUCRoom::handlePresence( const Presence& presence )
{
....
Tag* p = presence.tag();
Tag* x = 0;
if( m_roomHandler && p && ( x = p->findChild( "x", XMLNS, XMLNS_MUC_USER ) )
!= 0 )
{
MUCRoomParticipant party;
party.flags = 0;
party.nick = new JID( presence.from() );
party.jid = 0;
party.actor = 0;
...
}
the Tag* p , it' context like this:
<presence xmlns='jabber:client' to='cycloneblog@xxxxxxxxx/gloox76B978AF'
from='linuxcn@xxxxxxxxxxxxxxxxxxxxx/lerosua'><priority>1</priority><status>当你想不通的时候,想一下自己是在中国,一切就豁然开朗了。</status><c
xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='
http://gaim.sf.net/caps' ver='2.0.0beta5'/></presence>
so " ( x = p->findChild( "x", XMLNS, XMLNS_MUC_USER ) ) != 0 ) " will
nerver be true.
maybe you translate error presence to this function ,or maybe you use
wrong argument for p->findChild.
i have no idea . so i just use this code to avoid this bug.
if( m_roomHandler && p && ( x = p->findChild( "c", XMLNS, XMLNS_CAPS )
) != 0 )
but i hope you can fix this bug as soon as fast.
thanks.