Reset private stream data when a stream is terminated. Fixed bug: properly set user roster message parameters.

git-svn-id: http://voip.null.ro/svn/yate@3232 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2010-04-21 13:53:05 +00:00
parent 848caaa5b2
commit 6c28d0f98c
1 changed files with 10 additions and 2 deletions

View File

@ -1145,7 +1145,15 @@ void YJBEngine::processStreamEvent(JBEvent* ev, bool ok)
if (pres)
sendPresence(ev->stream(),true,pres);
}
else {
// Reset stream data
ev->stream()->lock();
ev->stream()->setRosterRequested(false);
StreamData* sdata = streamData(ev);
if (sdata)
sdata->m_contacts.clear();
ev->stream()->unlock();
}
Message* m = __plugin.message("user.notify",ev->clientStream());
m->addParam("username",ev->stream()->local().node());
m->addParam("server",ev->stream()->local().domain());
@ -1219,7 +1227,7 @@ static void addRosterItem(NamedList& list, XmlElement& x, const String& id,
if (XMPPUtils::isUnprefTag(*c,XmlTag::Group))
groups->append(c->getText(),",");
else
list.append(pref + c->unprefixedTag(),c->getText());
list.addParam(pref + c->unprefixedTag(),c->getText());
}
}