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

Purpose: compares item preproc table row with cached configuration data

Parameter: preproc - [IN] the cached item preprocessing operation
dbrow   - [IN] the database row

Return value: SUCCEED - the row matches configuration data
FAIL    - otherwise
dbsync_compare_item_preproc Purpose : compares item preproc table row with cached configuration data Parameter : preproc - [ IN ] the cached item preprocessing operation dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise
static int	dbsync_compare_item_preproc(const zbx_dc_preproc_op_t *preproc, const DB_ROW dbrow)
{
	if (FAIL == dbsync_compare_uint64(dbrow[1], preproc->itemid))
		return FAIL;
	if (FAIL == dbsync_compare_uchar(dbrow[2], preproc->type))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[3], preproc->params))
		return FAIL;
	if (FAIL == dbsync_compare_int(dbrow[4], preproc->step))
		return FAIL;
	if (FAIL == dbsync_compare_int(dbrow[6], preproc->error_handler))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[7], preproc->error_handler_params))
		return FAIL;
	return SUCCEED;
}
static int dbsync_compare_item_preproc ( const zbx_dc_preproc_op_t * preproc , const DB_ROW dbrow ) { if ( FAIL == dbsync_compare_uint64 ( dbrow [ 1 ] , preproc -> itemid ) ) return FAIL ; if ( FAIL == dbsync_compare_uchar ( dbrow [ 2 ] , preproc -> type ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 3 ] , preproc -> params ) ) return FAIL ; if ( FAIL == dbsync_compare_int ( dbrow [ 4 ] , preproc -> step ) ) return FAIL ; if ( FAIL == dbsync_compare_int ( dbrow [ 6 ] , preproc -> error_handler ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 7 ] , preproc -> error_handler_params ) ) return FAIL ; return SUCCEED ; }
Function: dbsync_compare_item_preproc                                      
                                                                            
 Purpose: compares item preproc table row with cached configuration data    
                                                                            
 Parameter: preproc - [IN] the cached item preprocessing operation          
            dbrow   - [IN] the database row                                 
                                                                            
 Return value: SUCCEED - the row matches configuration data                 
               FAIL    - otherwise
Function : dbsync_compare_item_preproc Purpose : compares item preproc table row with cached configuration data Parameter : preproc - [ IN ] the cached item preprocessing operation dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise