clean up drivers at the end of a session, and fix session file init.
This commit is contained in:
parent
e0508e6799
commit
8c76be539e
|
@ -378,8 +378,12 @@ int sr_session_stop(void)
|
|||
for (l = session->devices; l; l = l->next) {
|
||||
device = l->data;
|
||||
/* Check for device != NULL. */
|
||||
if (device->plugin && device->plugin->stop_acquisition)
|
||||
device->plugin->stop_acquisition(device->plugin_index, device);
|
||||
if (device->plugin) {
|
||||
if (device->plugin->stop_acquisition)
|
||||
device->plugin->stop_acquisition(device->plugin_index, device);
|
||||
if (device->plugin->cleanup)
|
||||
device->plugin->cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
|
|
|
@ -154,7 +154,6 @@ static void hw_cleanup(void);
|
|||
*/
|
||||
static int hw_init(const char *deviceinfo)
|
||||
{
|
||||
hw_cleanup();
|
||||
|
||||
sessionfile = g_strdup(deviceinfo);
|
||||
|
||||
|
|
Loading…
Reference in New Issue