mbahar94 / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

both Posix_QextSerialPort::open and Win_QextSerialPort::open may return without unlocking the mutex #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
if you review the code of the open functions, they have this code:

    LOCK_MUTEX();
    if (mode == QIODevice::NotOpen)
        return isOpen();

in which case the function might return without unlocking the mutex.
it seems to me that the order of these lines should be altered so that the 
mutex is locked only after checking the mode and returning on NotOpen.

Original issue reported on code.google.com by oranagra...@gmail.com on 28 Nov 2010 at 3:58

GoogleCodeExporter commented 9 years ago
I think you are looking at the old qextserialport code from sourceforge. Take a 
look at the source, which can be found here at the google project. It uses 
QMutexLocker class to avoid this.

Original comment by morck...@gmail.com on 1 Dec 2010 at 12:07

GoogleCodeExporter commented 9 years ago
Thanks, This issue is not valid any more for current version. Before 
QextSerialPort 1.2beta released, your can download the source using Mercurial.

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 8:29