X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=session.c;h=b80ab7d59f489ff4bcd3e87918a2e3454b2ee806;hb=548b08e55cf05aeb8f57b26b29035c3fb153f0f5;hp=cc6c133d1243ef5119142f88a518c8241993bb46;hpb=809c5f2011198a064a2e5e4028f19e63eb532ec1;p=libsigrok.git diff --git a/session.c b/session.c index cc6c133d..b80ab7d5 100644 --- a/session.c +++ b/session.c @@ -24,6 +24,7 @@ #include #include #include +#include /* 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; } @@ -81,6 +82,7 @@ int sr_session_device_add(struct sr_device *device) return SR_OK; } +#if 0 void sr_session_pa_clear(void) { /* @@ -95,6 +97,7 @@ void sr_session_pa_add(struct sr_analyzer *an) { session->analyzers = g_slist_append(session->analyzers, an); } +#endif void sr_session_datafeed_callback_clear(void) { @@ -156,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( @@ -170,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? */ @@ -187,7 +190,7 @@ void sr_session_run(void) void sr_session_halt(void) { - g_message("session: halting"); + sr_info("session: halting"); session->running = FALSE; } @@ -197,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;