Changeset 1571

Show
Ignore:
Timestamp:
05/31/09 04:28:17 (11 years ago)
Author:
ppalmers
Message:

free FCP listener when something goes wrong

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/libieee1394/ieee1394service.cpp

    r1451 r1571  
    5252    : m_configuration( NULL ) 
    5353    , m_handle( 0 ) 
    54     , m_handle_lock( new Util::PosixMutex("SRCVHND") ) 
     54    , m_handle_lock( new Util::PosixMutex("SRVCHND") ) 
    5555    , m_resetHandle( 0 ) 
    5656    , m_util_handle( 0 ) 
     
    8080    : m_configuration( NULL ) 
    8181    , m_handle( 0 ) 
    82     , m_handle_lock( new Util::PosixMutex("SRCVHND") ) 
     82    , m_handle_lock( new Util::PosixMutex("SRVCHND") ) 
    8383    , m_resetHandle( 0 ) 
    8484    , m_util_handle( 0 ) 
     
    783783    } 
    784784 
     785    // check the request and figure out what happened 
     786    if(m_fcp_block.status == eFS_Waiting) { 
     787        debugOutput(DEBUG_LEVEL_VERBOSE, "FCP response timed out\n"); 
     788        retval = false; 
     789        goto out; 
     790    } 
     791    if(m_fcp_block.status == eFS_Error) { 
     792        debugError("FCP request/response error\n"); 
     793        retval = false; 
     794        goto out; 
     795    } 
     796 
     797out: 
    785798    // stop listening for FCP responses 
    786799    err = raw1394_stop_fcp_listen(m_handle); 
     
    788801        debugOutput(DEBUG_LEVEL_VERBOSE, "could not stop FCP listen (err=%d, errno=%d)\n", err, errno); 
    789802        retval = false; 
    790         goto out; 
    791     } 
    792  
    793     // check the request and figure out what happened 
    794     if(m_fcp_block.status == eFS_Waiting) { 
    795         debugOutput(DEBUG_LEVEL_VERBOSE, "FCP response timed out\n"); 
    796         retval = false; 
    797         goto out; 
    798     } 
    799     if(m_fcp_block.status == eFS_Error) { 
    800         debugError("FCP request/response error\n"); 
    801         retval = false; 
    802         goto out; 
    803     } 
    804  
    805 out: 
     803    } 
     804 
    806805    m_fcp_block.status = eFS_Empty; 
    807806    return retval;