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

Purpose: compares conditions table row with cached configuration data

Parameter: condition - [IN] the cached action condition
dbrow     - [IN] the database row

Return value: SUCCEED - the row matches configuration data
FAIL    - otherwise
dbsync_compare_action_condition Purpose : compares conditions table row with cached configuration data Parameter : condition - [ IN ] the cached action condition dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise
static int	dbsync_compare_action_condition(const zbx_dc_action_condition_t *condition, const DB_ROW dbrow)
{
	if (FAIL == dbsync_compare_uchar(dbrow[2], condition->conditiontype))
		return FAIL;
	if (FAIL == dbsync_compare_uchar(dbrow[3], condition->op))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[4], condition->value))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[5], condition->value2))
		return FAIL;
	return SUCCEED;
}
static int dbsync_compare_action_condition ( const zbx_dc_action_condition_t * condition , const DB_ROW dbrow ) { if ( FAIL == dbsync_compare_uchar ( dbrow [ 2 ] , condition -> conditiontype ) ) return FAIL ; if ( FAIL == dbsync_compare_uchar ( dbrow [ 3 ] , condition -> op ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 4 ] , condition -> value ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 5 ] , condition -> value2 ) ) return FAIL ; return SUCCEED ; }
Function: dbsync_compare_action_condition                                  
                                                                            
 Purpose: compares conditions table row with cached configuration data      
                                                                            
 Parameter: condition - [IN] the cached action condition                    
            dbrow     - [IN] the database row                               
                                                                            
 Return value: SUCCEED - the row matches configuration data                 
               FAIL    - otherwise
Function : dbsync_compare_action_condition Purpose : compares conditions table row with cached configuration data Parameter : condition - [ IN ] the cached action condition dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise