Commit a1fe2223 authored by Benjamin REIS's avatar Benjamin REIS

fix & test last notify id in conference event package

parent 66a92bb8
......@@ -66,10 +66,9 @@ void LocalConferenceEventHandlerPrivate::notifyAll (const string &notify) {
}
string LocalConferenceEventHandlerPrivate::createNotify (ConferenceType confInfo) {
if (confInfo.getVersion().present()) {
lastNotify = confInfo.getVersion().get() + 1;
confInfo.setVersion(lastNotify);
}
lastNotify = lastNotify + 1;
confInfo.setVersion(lastNotify);
stringstream notify;
Xsd::XmlSchema::NamespaceInfomap map;
map[""].name = "urn:ietf:params:xml:ns:conference-info";
......
......@@ -1081,6 +1081,8 @@ void send_subject_changed_notify () {
BC_ASSERT_STRING_EQUAL(tester.confSubject.c_str(), "A random test subject");
BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d");
BC_ASSERT_EQUAL(L_GET_PRIVATE(tester.handler)->getLastNotify(), 1, int, "%d");
BC_ASSERT_EQUAL(localHandlerPrivate->getLastNotify(), 1, int, "%d");
BC_ASSERT_TRUE(tester.participants.find(bobAddr.asString()) != tester.participants.end());
BC_ASSERT_TRUE(tester.participants.find(aliceAddr.asString()) != tester.participants.end());
BC_ASSERT_TRUE(!tester.participants.find(bobAddr.asString())->second);
......@@ -1092,6 +1094,8 @@ void send_subject_changed_notify () {
BC_ASSERT_STRING_EQUAL(tester.confSubject.c_str(), "Another random test subject...");
BC_ASSERT_EQUAL(tester.participants.size(), 2, int, "%d");
BC_ASSERT_EQUAL(L_GET_PRIVATE(tester.handler)->getLastNotify(), 2, int, "%d");
BC_ASSERT_EQUAL(localHandlerPrivate->getLastNotify(), 2, int, "%d");
BC_ASSERT_TRUE(tester.participants.find(bobAddr.asString()) != tester.participants.end());
BC_ASSERT_TRUE(tester.participants.find(aliceAddr.asString()) != tester.participants.end());
BC_ASSERT_TRUE(!tester.participants.find(bobAddr.asString())->second);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment