Fix missing return in KMobileDevice::unlockDevice

This resolves bug 2692

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 105df0826e)
r14.0.x
Slávek Banko 9 years ago
parent 2ea5a6376f
commit d465e287d1

@ -382,12 +382,14 @@ bool KMobileDevice::unlockDevice(const TQString &device)
#ifdef HAVE_BAUDBOY_H
return ttyunlock(device.local8bit()) == EXIT_SUCCESS;
#else
if (m_fd != -1)
{
flock(m_fd, LOCK_UN);
if (m_fd != -1) {
if(flock(m_fd, LOCK_UN)) {
return false;
}
close(m_fd);
close(m_fd);
}
m_fd = -1;
return true;
#endif
}

Loading…
Cancel
Save