Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-979

lock() / unlock() mismatch in engine/HandlerLoader.cpp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • current (nightly)
    • 1.6 Beta
    • Server - Engine
    • None

    Description

      In

      int HandlerLoader::createHandler (BasicHandler** pHandler, int nLibId)

      there is this code:

      //lock ();
      Lock l(this);

      and later this code:

      unlock ();

      I assume the unlock() call should be commented out, as this is the case in other places. ~Lock() releases the mutex it acquired in Lock() so an explicit call to l.unlock() (as in other places in that file) should not be needed.

      Also, as a side note, it would be better to use critical sections on Windows, since mutexes on that platform are cross process and slow.

      Attachments

        Activity

          People

            hnordberg Henrik Nordberg
            hnordberg Henrik Nordberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: