mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 17:29:20 +00:00
do not notify unknown device
This commit is contained in:
parent
e620b432b2
commit
12660bea3a
1 changed files with 4 additions and 5 deletions
|
|
@ -404,15 +404,14 @@ void LocalConferenceEventHandler::subscribeReceived (LinphoneEvent *lev, bool on
|
|||
|
||||
const LinphoneAddress *lContactAddr = linphone_event_get_remote_contact(lev);
|
||||
char *contactAddrStr = linphone_address_as_string(lContactAddr);
|
||||
Address contactAddr(contactAddrStr);
|
||||
IdentityAddress contactAddr(contactAddrStr);
|
||||
bctbx_free(contactAddrStr);
|
||||
if (contactAddr.getUriParamValue("gr").empty()) {
|
||||
shared_ptr<ParticipantDevice> device = participant->getPrivate()->findDevice(contactAddr);
|
||||
if (!device) {
|
||||
lError() << "received SUBSCRIBE for conference: " << d->conf->getConferenceAddress().asString()
|
||||
<< "has no GRUU in it's contact address:" << contactAddr.asString() << ", no NOTIFY sent.";
|
||||
<< "device sending subscribe: " << contactAddr.asString() << " is not known, no NOTIFY sent.";
|
||||
return;
|
||||
}
|
||||
IdentityAddress gruu(contactAddr);
|
||||
shared_ptr<ParticipantDevice> device = participant->getPrivate()->addDevice(gruu);
|
||||
|
||||
if (linphone_event_get_subscription_state(lev) == LinphoneSubscriptionActive) {
|
||||
unsigned int lastNotify = static_cast<unsigned int>(Utils::stoi(linphone_event_get_custom_header(lev, "Last-Notify-Version")));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue