diff --git a/modules/conference.cpp b/modules/conference.cpp index d70a6e5d..34281e91 100644 --- a/modules/conference.cpp +++ b/modules/conference.cpp @@ -102,6 +102,8 @@ public: { return m_maxLock; } inline bool timeout(const Time& time) const { return m_expire && m_expire < time; } + inline bool created() + { return m_created && !(m_created = false); } void mix(ConfConsumer* cons = 0); void addChannel(ConfChan* chan, bool player = false); void delChannel(ConfChan* chan); @@ -121,6 +123,7 @@ private: String m_notify; String m_playerId; bool m_lonely; + bool m_created; ConfChan* m_record; int m_rate; int m_users; @@ -281,7 +284,7 @@ ConfRoom* ConfRoom::get(const String& name, const NamedList* params) // Private constructor, always called from ConfRoom::get() with mutex hold ConfRoom::ConfRoom(const String& name, const NamedList& params) - : m_name(name), m_lonely(false), m_record(0), + : m_name(name), m_lonely(false), m_created(true), m_record(0), m_rate(8000), m_users(0), m_maxusers(10), m_maxLock(200), m_expire(0), m_lonelyInterval(0) { @@ -963,8 +966,10 @@ bool ConfHandler::received(Message& msg) peer->connect(p,reason,false); p->deref(); } - if (c->room()) + if (c->room()) { + msg.setParam("newroom",String::boolText(c->room()->created())); msg.setParam("users",String(c->room()->users())); + } c->deref(); return true; } @@ -1079,8 +1084,10 @@ bool ConferenceDriver::msgExecute(Message& msg, String& dest) c->callConnect(msg); msg.setParam("peerid",c->id()); msg.setParam("room",prefix()+dest); - if (c->room()) + if (c->room()) { + msg.setParam("newroom",String::boolText(c->room()->created())); msg.setParam("users",String(c->room()->users())); + } c->deref(); return true; }