]> sigrok.org Git - libsigrok.git/blobdiff - session.c
log messages: Use device name, not vendor name.
[libsigrok.git] / session.c
index 811bf1393fdb6f62c5b021f1f5116c89f6b49c49..b80ab7d59f489ff4bcd3e87918a2e3454b2ee806 100644 (file)
--- a/session.c
+++ b/session.c
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <glib.h>
 #include <sigrok.h>
+#include <sigrok-internal.h>
 
 /* demo.c */
 extern GIOChannel channels[2];
@@ -70,8 +71,8 @@ int sr_session_device_add(struct sr_device *device)
 {
        int ret;
 
-       if (device->plugin && device->plugin->open) {
-               ret = device->plugin->open(device->plugin_index);
+       if (device->plugin && device->plugin->opendev) {
+               ret = device->plugin->opendev(device->plugin_index);
                if (ret != SR_OK)
                        return ret;
        }
@@ -158,7 +159,7 @@ int sr_session_start(void)
        GSList *l;
        int ret;
 
-       g_message("session: starting");
+       sr_info("session: starting");
        for (l = session->devices; l; l = l->next) {
                device = l->data;
                if ((ret = device->plugin->start_acquisition(
@@ -172,7 +173,7 @@ int sr_session_start(void)
 void sr_session_run(void)
 {
 
-       g_message("session: running");
+       sr_info("session: running");
        session->running = TRUE;
 
        /* do we have real sources? */
@@ -189,7 +190,7 @@ void sr_session_run(void)
 void sr_session_halt(void)
 {
 
-       g_message("session: halting");
+       sr_info("session: halting");
        session->running = FALSE;
 
 }
@@ -199,7 +200,7 @@ void sr_session_stop(void)
        struct sr_device *device;
        GSList *l;
 
-       g_message("session: stopping");
+       sr_info("session: stopping");
        session->running = FALSE;
        for (l = session->devices; l; l = l->next) {
                device = l->data;