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

Purpose: compares correlation table row with cached configuration data

Parameter: correlation - [IN] the cached correlation rule
dbrow       - [IN] the database row

Return value: SUCCEED - the row matches configuration data
FAIL    - otherwise
dbsync_compare_correlation Purpose : compares correlation table row with cached configuration data Parameter : correlation - [ IN ] the cached correlation rule dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise
static int	dbsync_compare_correlation(const zbx_dc_correlation_t *correlation, const DB_ROW dbrow)
{
	if (FAIL == dbsync_compare_str(dbrow[1], correlation->name))
		return FAIL;
	if (FAIL == dbsync_compare_uchar(dbrow[2], correlation->evaltype))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[3], correlation->formula))
		return FAIL;
	return SUCCEED;
}
static int dbsync_compare_correlation ( const zbx_dc_correlation_t * correlation , const DB_ROW dbrow ) { if ( FAIL == dbsync_compare_str ( dbrow [ 1 ] , correlation -> name ) ) return FAIL ; if ( FAIL == dbsync_compare_uchar ( dbrow [ 2 ] , correlation -> evaltype ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 3 ] , correlation -> formula ) ) return FAIL ; return SUCCEED ; }
Function: dbsync_compare_correlation                                       
                                                                            
 Purpose: compares correlation table row with cached configuration data     
                                                                            
 Parameter: correlation - [IN] the cached correlation rule                  
            dbrow       - [IN] the database row                             
                                                                            
 Return value: SUCCEED - the row matches configuration data                 
               FAIL    - otherwise
Function : dbsync_compare_correlation Purpose : compares correlation table row with cached configuration data Parameter : correlation - [ IN ] the cached correlation rule dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise