mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add implementation for BTH custom serial close method on Windows
Implement the close method used on Windows platforms for our custom serial implementation. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e2cac92d23
commit
23c5dee2f1
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,9 @@ static int qt_serial_close(serial_t *device)
|
||||||
return DC_STATUS_SUCCESS;
|
return DC_STATUS_SUCCESS;
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
// TODO do the cleanup
|
// Cleanup
|
||||||
|
closesocket(device->socket);
|
||||||
|
free(device);
|
||||||
#else
|
#else
|
||||||
if (device->socket == NULL) {
|
if (device->socket == NULL) {
|
||||||
free(device);
|
free(device);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue