From ec18035244c1e09301799cf6a1ea68445671957d Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Fri, 13 Oct 2017 15:20:19 +0200 Subject: [PATCH] add custom header telling last received notify to conf event subscribe --- src/conference/participant-device.cpp | 2 +- src/conference/remote-conference-event-handler.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conference/participant-device.cpp b/src/conference/participant-device.cpp index 524ae7e2d..16a2130c3 100644 --- a/src/conference/participant-device.cpp +++ b/src/conference/participant-device.cpp @@ -33,4 +33,4 @@ bool ParticipantDevice::operator== (const ParticipantDevice &device) const { return (mGruu == device.getGruu()); } -LINPHONE_END_NAMESPACE \ No newline at end of file +LINPHONE_END_NAMESPACE diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index 749cd5bed..53eeaf20a 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -20,6 +20,7 @@ #include "private.h" #include "logger/logger.h" #include "remote-conference-event-handler-p.h" +#include "linphone/utils/utils.h" #include "xml/conference-info.h" // ============================================================================= @@ -49,10 +50,10 @@ RemoteConferenceEventHandler::~RemoteConferenceEventHandler () { void RemoteConferenceEventHandler::subscribe (const Address &addr) { L_D(); - // TODO : add last notify d->confAddress = addr; LinphoneAddress *lAddr = linphone_address_new(d->confAddress.asString().c_str()); d->lev = linphone_core_create_subscribe(d->core, lAddr, "conference", 600); + linphone_event_add_custom_header(d->lev, "Last-Notify-Version", Utils::toString(d->lastNotify).c_str()); linphone_address_unref(lAddr); linphone_event_set_internal(d->lev, TRUE); linphone_event_set_user_data(d->lev, this);