Commit c1d4e387 authored by Simon Morlat's avatar Simon Morlat

Modifies the behavior of one to one chatroom.

From now on, the conference server NEVER removes participants of a one to one chatroom. The receiving of a BYE is interpreted as a client that wants to disconnect from the chatroom. It will be reINVITEd when needed, when a new message is sent to him.
This greatly simplifies the code and makes it consistent with the fact that participant leaving were not notified.
Additionally, the conference server now adds a header "Session-mode: true" in the SIP MESSAGE so that clients can identify that a message is belonging to a server based chatroom, and report an error when it doesn't have the knowledge about the chatroom.
parent edb92f1d
......@@ -69,7 +69,6 @@ public:
std::shared_ptr<Participant> findAuthorizedParticipant (const std::shared_ptr<const CallSession> &session) const;
std::shared_ptr<Participant> findAuthorizedParticipant (const IdentityAddress &participantAddress) const;
ParticipantDevice::State getParticipantDeviceState (const std::shared_ptr<const ParticipantDevice> &device) const;
void setParticipantDeviceState (const std::shared_ptr<ParticipantDevice> &device, ParticipantDevice::State state);
void acceptSession (const std::shared_ptr<CallSession> &session);
......@@ -127,10 +126,10 @@ private:
};
static void copyMessageHeaders (const std::shared_ptr<Message> &fromMessage, const std::shared_ptr<ChatMessage> &toMessage);
static bool allDevicesLeft(const std::shared_ptr<Participant> &participant);
void addParticipantDevice (const std::shared_ptr<Participant> &participant, const ParticipantDeviceIdentity &deviceInfo);
void designateAdmin ();
void dispatchMessage (const std::shared_ptr<Message> &message, const std::string &uri);
void sendMessage (const std::shared_ptr<Message> &message, const IdentityAddress &deviceAddr);
void finalizeCreation ();
std::shared_ptr<CallSession> makeSession(const std::shared_ptr<ParticipantDevice> &device);
void inviteDevice (const std::shared_ptr<ParticipantDevice> &device);
......
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