]> sigrok.org Git - pulseview.git/commitdiff
StoreSession: Use DeviceManager to get context
authorJoel Holdsworth <redacted>
Sat, 28 Mar 2015 13:12:10 +0000 (13:12 +0000)
committerJoel Holdsworth <redacted>
Thu, 28 May 2015 14:59:04 +0000 (15:59 +0100)
pv/storesession.cpp

index 20fa19fef41d744d6da784620884a84256bdc30f..1dad2d8052e360e5f3b9ff70e4edf4da04d9b7dd 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "storesession.hpp"
 
+#include <pv/devicemanager.hpp>
 #include <pv/session.hpp>
 #include <pv/data/logic.hpp>
 #include <pv/data/logicsegment.hpp>
@@ -130,7 +131,7 @@ bool StoreSession::start()
 
        // Begin storing
        try {
-               auto context = session_.session()->context();
+               const auto context = session_.device_manager().context();
                auto device = session_.device();
 
                map<string, Glib::VariantBase> options = options_;
@@ -206,7 +207,7 @@ void StoreSession::store_proc(shared_ptr<data::LogicSegment> segment)
                size_t length = end_sample - start_sample;
 
                try {
-                       auto context = session_.session()->context();
+                       const auto context = session_.device_manager().context();
                        auto logic = context->create_logic_packet(data, length, unit_size);
                        const string data = output_->receive(logic);
                        if (output_stream_.is_open())