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

Purpose: compares actions table row with cached configuration data

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

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