From: <uli...@us...> - 2010-06-14 06:52:03
|
Revision: 7102 http://openhpi.svn.sourceforge.net/openhpi/?rev=7102&view=rev Author: ulikleber Date: 2010-06-14 06:51:53 +0000 (Mon, 14 Jun 2010) Log Message: ----------- Fix for #3013166 saHpiInitialize and version compatibility Modified Paths: -------------- openhpi/trunk/baselib/oh_client.cpp openhpi/trunk/include/oHpi.h Modified: openhpi/trunk/baselib/oh_client.cpp =================================================================== --- openhpi/trunk/baselib/oh_client.cpp 2010-06-13 15:44:00 UTC (rev 7101) +++ openhpi/trunk/baselib/oh_client.cpp 2010-06-14 06:51:53 UTC (rev 7102) @@ -146,7 +146,8 @@ SAHPI_OUT SaHpiUint32T *FailedOption, SAHPI_OUT SaErrorT *OptionError) { - if ( RequestedVersion != SAHPI_INTERFACE_VERSION ) { + if ( RequestedVersion < OH_SAHPI_INTERFACE_VERSION_MIN_SUPPORTED ) || + ( RequestedVersion > OH_SAHPI_INTERFACE_VERSION_MAX_SUPPORTED ) { return SA_ERR_HPI_UNSUPPORTED_API; } if ( ( NumOptions != 0 ) && ( Options == NULL ) ) { Modified: openhpi/trunk/include/oHpi.h =================================================================== --- openhpi/trunk/include/oHpi.h 2010-06-13 15:44:00 UTC (rev 7101) +++ openhpi/trunk/include/oHpi.h 2010-06-14 06:51:53 UTC (rev 7102) @@ -23,6 +23,9 @@ #define OPENHPI_DEFAULT_DAEMON_PORT 4743 #define MAX_PLUGIN_NAME_LENGTH 32 +#define OH_SAHPI_INTERFACE_VERSION_MIN_SUPPORTED (SaHpiVersionT)0x020101 /* B.01.01 */ +#define OH_SAHPI_INTERFACE_VERSION_MAX_SUPPORTED SAHPI_INTERFACE_VERSION + typedef SaHpiUint32T oHpiHandlerIdT; typedef struct { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |