tcutils: fix WTSVirtualChannelWrite return codes check according to API change

This commit is contained in:
speidy 2017-09-07 01:02:47 +03:00 committed by metalefty
parent fad2c57cd6
commit 36eda1bcbb
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ int Utils::getMountList(void *wtsChannel, QList<QListWidgetItem *> *itemList)
/* send command */
rv = WTSVirtualChannelWrite(wtsChannel, s.data, bytesToSend, &bytesWritten);
if (rv)
if (rv == 0)
{
QMessageBox::information(NULL, "Get device list", "\nError sending "
"command to client");
@ -126,7 +126,7 @@ int Utils::unmountDevice(void *wtsChannel, QString device, QStatusBar *statusBar
/* send command */
rv = WTSVirtualChannelWrite(wtsChannel, s.data, bytesToSend, &bytesWritten);
if (rv)
if (rv == 0)
{
QMessageBox::information(NULL, "Unmount device", "\nError sending "
"command to client");