Show
Ignore:
Timestamp:
08/31/07 01:56:53 (16 years ago)
Author:
ppalmers
Message:

- Fix file-based discovery. The previous code used a pointer to a

vendormodel entry. This pointer however pointed to a VendorModel?
object that was created on the stack of the discover function.
Hence the pointer becomes invalid when the discover function is
exited.

The changes incorporate using a VendorModelEntry? struct instead
of a pointer to it. So now the FFADODevice has it's own copy of
this struct, instead of a pointer to it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/genericavc/avc_vendormodel.h

    r599 r607  
    3535    VendorModelEntry(const VendorModelEntry& rhs); 
    3636    VendorModelEntry& operator = (const VendorModelEntry& rhs); 
     37    bool operator == (const VendorModelEntry& rhs) const; 
    3738    virtual ~VendorModelEntry(); 
    3839 
     
    5657                                         std::vector<std::string>::const_iterator& b, 
    5758                                         std::vector<std::string>::const_iterator& e ); 
    58     VendorModelEntry* find( unsigned int vendor_id,  unsigned model_id ); 
     59    VendorModelEntry find( unsigned int vendor_id,  unsigned model_id ); 
     60    bool isPresent( unsigned int vendor_id,  unsigned model_id ); 
     61    static bool isValid( const VendorModelEntry& vme ); 
    5962 
    6063    const VendorModelEntryVector& getVendorModelEntries() const; 
     
    6265    std::string m_filename; 
    6366    VendorModelEntryVector m_vendorModelEntries; 
     67 
    6468}; 
    6569