mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Check registration state before sending subscribe in the remote conference event handler.
This commit is contained in:
parent
519153278d
commit
59f9c18b84
1 changed files with 6 additions and 0 deletions
|
|
@ -169,8 +169,14 @@ void RemoteConferenceEventHandlerPrivate::simpleNotifyReceived (const string &xm
|
|||
void RemoteConferenceEventHandlerPrivate::subscribe () {
|
||||
if (lev || !subscriptionWanted)
|
||||
return; // Already subscribed or application did not request subscription
|
||||
|
||||
const string &peerAddress = chatRoomId.getPeerAddress().asString();
|
||||
LinphoneAddress *lAddr = linphone_address_new(peerAddress.c_str());
|
||||
LinphoneCore *lc = conf->getCore()->getCCore();
|
||||
LinphoneProxyConfig *cfg = linphone_core_lookup_known_proxy(lc, lAddr);
|
||||
if (!cfg || (linphone_proxy_config_get_state(cfg) != LinphoneRegistrationOk))
|
||||
return;
|
||||
|
||||
lev = linphone_core_create_subscribe(conf->getCore()->getCCore(), lAddr, "conference", 600);
|
||||
lev->op->set_from(chatRoomId.getLocalAddress().asString().c_str());
|
||||
const string &lastNotifyStr = Utils::toString(lastNotify);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue