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

Purpose: compares functions table row with cached configuration data

Parameter: function - [IN] the cached function
dbrow    - [IN] the database row

Return value: SUCCEED - the row matches configuration data
FAIL    - otherwise
dbsync_compare_function Purpose : compares functions table row with cached configuration data Parameter : function - [ IN ] the cached function dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise
static int	dbsync_compare_function(const ZBX_DC_FUNCTION *function, const DB_ROW dbrow)
{
	if (FAIL == dbsync_compare_uint64(dbrow[0], function->itemid))
		return FAIL;
	if (FAIL == dbsync_compare_uint64(dbrow[4], function->triggerid))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[2], function->function))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[3], function->parameter))
		return FAIL;
	return SUCCEED;
}
static int dbsync_compare_function ( const ZBX_DC_FUNCTION * function , const DB_ROW dbrow ) { if ( FAIL == dbsync_compare_uint64 ( dbrow [ 0 ] , function -> itemid ) ) return FAIL ; if ( FAIL == dbsync_compare_uint64 ( dbrow [ 4 ] , function -> triggerid ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 2 ] , function -> function ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 3 ] , function -> parameter ) ) return FAIL ; return SUCCEED ; }
Function: dbsync_compare_function                                          
                                                                            
 Purpose: compares functions table row with cached configuration data       
                                                                            
 Parameter: function - [IN] the cached function                             
            dbrow    - [IN] the database row                                
                                                                            
 Return value: SUCCEED - the row matches configuration data                 
               FAIL    - otherwise
Function : dbsync_compare_function Purpose : compares functions table row with cached configuration data Parameter : function - [ IN ] the cached function dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise