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:
Claudiu Olteanu 2015-08-18 21:37:50 +03:00 committed by Dirk Hohndel
parent e2cac92d23
commit 23c5dee2f1

View file

@ -185,7 +185,9 @@ static int qt_serial_close(serial_t *device)
return DC_STATUS_SUCCESS;
#if defined(Q_OS_WIN)
// TODO do the cleanup
// Cleanup
closesocket(device->socket);
free(device);
#else
if (device->socket == NULL) {
free(device);