Skip to content

Commit 36eda1b

Browse files
speidymetalefty
authored andcommitted
tcutils: fix WTSVirtualChannelWrite return codes check according to API change
1 parent fad2c57 commit 36eda1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tcutils/utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int Utils::getMountList(void *wtsChannel, QList<QListWidgetItem *> *itemList)
3737

3838
/* send command */
3939
rv = WTSVirtualChannelWrite(wtsChannel, s.data, bytesToSend, &bytesWritten);
40-
if (rv)
40+
if (rv == 0)
4141
{
4242
QMessageBox::information(NULL, "Get device list", "\nError sending "
4343
"command to client");
@@ -126,7 +126,7 @@ int Utils::unmountDevice(void *wtsChannel, QString device, QStatusBar *statusBar
126126

127127
/* send command */
128128
rv = WTSVirtualChannelWrite(wtsChannel, s.data, bytesToSend, &bytesWritten);
129-
if (rv)
129+
if (rv == 0)
130130
{
131131
QMessageBox::information(NULL, "Unmount device", "\nError sending "
132132
"command to client");

0 commit comments

Comments
 (0)