mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 13:08:08 +00:00
only accept subscription if there is something to send
This commit is contained in:
parent
55d7e53da0
commit
561c5dd757
1 changed files with 8 additions and 1 deletions
|
|
@ -61,7 +61,6 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
|
|||
linphone_event_deny_subscription(lev, LinphoneReasonDeclined);
|
||||
return;
|
||||
}
|
||||
linphone_event_accept_subscription(lev);
|
||||
|
||||
const LinphoneAddress *lAddr = linphone_event_get_from(lev);
|
||||
char *addrStr = linphone_address_as_string(lAddr);
|
||||
|
|
@ -81,6 +80,7 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
|
|||
Xsd::Rlmi::List::ResourceSequence resources;
|
||||
|
||||
// Parse resource list
|
||||
bool noContent = true;
|
||||
istringstream data(xmlBody);
|
||||
unique_ptr<Xsd::ResourceLists::ResourceLists> rl(Xsd::ResourceLists::parseResourceLists(
|
||||
data,
|
||||
|
|
@ -119,6 +119,7 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
|
|||
}
|
||||
device->setConferenceSubscribeEvent((subscriptionState == LinphoneSubscriptionIncomingReceived) ? lev : nullptr);
|
||||
|
||||
noContent = false;
|
||||
Content content;
|
||||
if (notifyId > 0) {
|
||||
ContentType contentType(ContentType::Multipart);
|
||||
|
|
@ -147,6 +148,12 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
|
|||
}
|
||||
}
|
||||
|
||||
if (noContent) {
|
||||
linphone_event_deny_subscription(lev, LinphoneReasonDeclined);
|
||||
return;
|
||||
}
|
||||
linphone_event_accept_subscription(lev);
|
||||
|
||||
Xsd::Rlmi::List list("", 0, TRUE);
|
||||
list.setResource(resources);
|
||||
Xsd::XmlSchema::NamespaceInfomap map;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue