zabbix-agent2/src/libs/zbxdbcache/dbsync.c
/******************************************************************************
 *                                                                            *
 * Function: dbsync_compare_host_inventory                                    *
 *                                                                            *
 * Purpose: compares host inventory table row with cached configuration data  *
 *                                                                            *
 * Parameter: hi    - [IN] the cached host inventory data                     *
 *            dbrow - [IN] the database row                                   *
 *                                                                            *
 * Return value: SUCCEED - the row matches configuration data                 *
 *               FAIL    - otherwise                                          *
 *                                                                            *
 ******************************************************************************/
dbsync_compare_host_inventory

Purpose: compares host inventory table row with cached configuration data

Parameter: hi    - [IN] the cached host inventory data
dbrow - [IN] the database row

Return value: SUCCEED - the row matches configuration data
FAIL    - otherwise
dbsync_compare_host_inventory Purpose : compares host inventory table row with cached configuration data Parameter : hi - [ IN ] the cached host inventory data dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise
static int	dbsync_compare_host_inventory(const ZBX_DC_HOST_INVENTORY *hi, const DB_ROW dbrow)
{
	int	i;
	if (SUCCEED != dbsync_compare_uchar(dbrow[1], hi->inventory_mode))
		return FAIL;
	for (i = 0; i < HOST_INVENTORY_FIELD_COUNT; i++)
	{
		if (FAIL == dbsync_compare_str(dbrow[i + 2], hi->values[i]))
			return FAIL;
	}
	return SUCCEED;
}
static int dbsync_compare_host_inventory ( const ZBX_DC_HOST_INVENTORY * hi , const DB_ROW dbrow ) { int i ; if ( SUCCEED != dbsync_compare_uchar ( dbrow [ 1 ] , hi -> inventory_mode ) ) return FAIL ; for ( i = 0 ; i < HOST_INVENTORY_FIELD_COUNT ; i ++ ) { if ( FAIL == dbsync_compare_str ( dbrow [ i + 2 ] , hi -> values [ i ] ) ) return FAIL ; } return SUCCEED ; }
Function: dbsync_compare_host_inventory                                    
                                                                            
 Purpose: compares host inventory table row with cached configuration data  
                                                                            
 Parameter: hi    - [IN] the cached host inventory data                     
            dbrow - [IN] the database row                                   
                                                                            
 Return value: SUCCEED - the row matches configuration data                 
               FAIL    - otherwise
Function : dbsync_compare_host_inventory Purpose : compares host inventory table row with cached configuration data Parameter : hi - [ IN ] the cached host inventory data dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise