Move release of serial adapter to before underlying device is released
This commit is contained in:
@@ -361,6 +361,13 @@ void shmdatamapcallback(uv_timer_t* handle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
for(int d = 0; d < 10; d++)
|
||||||
|
{
|
||||||
|
if(monocoque_serial_devices[d].portname != NULL)
|
||||||
|
{
|
||||||
|
free(monocoque_serial_devices[d].portname);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (int x = 0; x < numdevices; x++)
|
for (int x = 0; x < numdevices; x++)
|
||||||
{
|
{
|
||||||
if (devices[x].initialized == true)
|
if (devices[x].initialized == true)
|
||||||
@@ -370,13 +377,7 @@ void shmdatamapcallback(uv_timer_t* handle)
|
|||||||
}
|
}
|
||||||
free(devices);
|
free(devices);
|
||||||
|
|
||||||
for(int d = 0; d < 10; d++)
|
|
||||||
{
|
|
||||||
if(monocoque_serial_devices[d].portname != NULL)
|
|
||||||
{
|
|
||||||
free(monocoque_serial_devices[d].portname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int r = simfree(simdata, simmap, f->map);
|
int r = simfree(simdata, simmap, f->map);
|
||||||
slogd("simfree returned %i", r);
|
slogd("simfree returned %i", r);
|
||||||
f->numdevices = 0;
|
f->numdevices = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user