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 #ifdef HAVE_BAUDBOY_H
return ttyunlock(device.local8bit()) == EXIT_SUCCESS; return ttyunlock(device.local8bit()) == EXIT_SUCCESS;
#else #else
if (m_fd != -1) if (m_fd != -1) {
{ if(flock(m_fd, LOCK_UN)) {
flock(m_fd, LOCK_UN); return false;
} }
close(m_fd); close(m_fd);
}
m_fd = -1; m_fd = -1;
return true;
#endif #endif
} }

Loading…
Cancel
Save