#include <assert.h>
+#include <QDebug>
+
using namespace boost;
using namespace std;
void SigSession::feed_in_logic(const sr_datafeed_logic &logic)
{
lock_guard<mutex> lock(_data_mutex);
- if (!_cur_logic_snapshot)
+
+ if (!_logic_data)
{
- assert(_logic_data);
+ qDebug() << "Unexpected logic packet";
+ return;
+ }
+ if (!_cur_logic_snapshot)
+ {
// Create a new data snapshot
_cur_logic_snapshot = shared_ptr<data::LogicSnapshot>(
new data::LogicSnapshot(logic));
void SigSession::feed_in_analog(const sr_datafeed_analog &analog)
{
lock_guard<mutex> lock(_data_mutex);
- if (!_cur_analog_snapshot)
+
+ if(!_analog_data)
{
- assert(_analog_data);
+ qDebug() << "Unexpected analog packet";
+ return; // This analog packet was not expected.
+ }
+ if (!_cur_analog_snapshot)
+ {
// Create a new data snapshot
_cur_analog_snapshot = shared_ptr<data::AnalogSnapshot>(
new data::AnalogSnapshot(analog));