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

Purpose: compares trigger tags table row with cached configuration data

Parameter: tag   - [IN] the cached trigger tag
dbrow - [IN] the database row

Return value: SUCCEED - the row matches configuration data
FAIL    - otherwise
dbsync_compare_trigger_tag Purpose : compares trigger tags table row with cached configuration data Parameter : tag - [ IN ] the cached trigger tag dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise
static int	dbsync_compare_trigger_tag(const zbx_dc_trigger_tag_t *tag, const DB_ROW dbrow)
{
	if (FAIL == dbsync_compare_uint64(dbrow[1], tag->triggerid))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[2], tag->tag))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[3], tag->value))
		return FAIL;
	return SUCCEED;
}
static int dbsync_compare_trigger_tag ( const zbx_dc_trigger_tag_t * tag , const DB_ROW dbrow ) { if ( FAIL == dbsync_compare_uint64 ( dbrow [ 1 ] , tag -> triggerid ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 2 ] , tag -> tag ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 3 ] , tag -> value ) ) return FAIL ; return SUCCEED ; }
Function: dbsync_compare_trigger_tag                                       
                                                                            
 Purpose: compares trigger tags table row with cached configuration data    
                                                                            
 Parameter: tag   - [IN] the cached trigger tag                             
            dbrow - [IN] the database row                                   
                                                                            
 Return value: SUCCEED - the row matches configuration data                 
               FAIL    - otherwise
Function : dbsync_compare_trigger_tag Purpose : compares trigger tags table row with cached configuration data Parameter : tag - [ IN ] the cached trigger tag dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise