Fix missing return in KMobileDevice::unlockDevice

This resolves bug 2692

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/21/head
Slávek Banko 8 years ago
parent dcf83fa05d
commit 105df0826e

@ -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