From baf6f95839a1205fc9bc2049665074d6f0ef1cba Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 17 Dec 2015 17:16:58 +0100 Subject: [PATCH] filter out periodical call stats updates from linphone-daemon's event queue (there are too many) --- daemon/commands/call.cc | 2 +- daemon/daemon.cc | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/daemon/commands/call.cc b/daemon/commands/call.cc index 4a644431f..262dee8f5 100644 --- a/daemon/commands/call.cc +++ b/daemon/commands/call.cc @@ -25,7 +25,7 @@ void CallCommand::exec(Daemon *app, const char *args) { char *opt; LinphoneCallParams *cp; opt = strstr(early_media,"--early-media"); - cp = linphone_core_create_default_call_parameters(app->getCore()); + cp = linphone_core_create_call_params(app->getCore(), NULL); if (opt) { linphone_call_params_enable_early_media_sending(cp, TRUE); ostr << "Early media: Ok\n"; diff --git a/daemon/daemon.cc b/daemon/daemon.cc index 2e0c6deb3..cfb98939e 100644 --- a/daemon/daemon.cc +++ b/daemon/daemon.cc @@ -515,7 +515,12 @@ void Daemon::callStateChanged(LinphoneCall *call, LinphoneCallState state, const } void Daemon::callStatsUpdated(LinphoneCall *call, const LinphoneCallStats *stats) { - if (mUseStatsEvents) mEventQueue.push(new CallStatsResponse(this, call, stats, true)); + if (mUseStatsEvents) { + /* don't queue periodical updates (3 per seconds for just bandwidth updates) */ + if (!(stats->updated & LINPHONE_CALL_STATS_PERIODICAL_UPDATE)){ + mEventQueue.push(new CallStatsResponse(this, call, stats, true)); + } + } } void Daemon::dtmfReceived(LinphoneCall *call, int dtmf) {