Hello everybody, i have an application that worked with the gloox 0.9 and
want to move to the gloox 1.0, but am having difficulties. The problem is
when sending a tag with multiple attributes and the client registers in
messageHandler but can not extract these attributes from message. In gloox
0.9 was just looking for the attribute in Stanza.
The Tag sent:
Tag *m = new Tag( "message");
m->addAttribute( "from", id );
m->addAttribute( "to", to.full() );
m->addAttribute( "type", "chat" );
Tag *b = new Tag( "xmpp_negotiation_plugin" );
b->addAttribute("test", "test");
m->addChild( b );
Client code when receive the message:
void SimpleClient::handleMessage( const Message& msg, MessageSession *
/*session*/ )
{
Tag* m = msg.tag();
if (m)
{
Tag *x = m->findChild( "xmpp_negotiation_plugin" );
if( x )
{
const std::string out = x->findAttribute("test"); //not is
executed
}
delete m;
}
}
X does not receive any allocation.
Any suggestion?
Thanks,
Heverton Stuart