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

Purpose: compares item script params table row with cached configuration
data

Parameter: script - [IN] the cached item script
dbrow  - [IN] the database row

Return value: SUCCEED - the row matches configuration data
FAIL    - otherwise
dbsync_compare_itemscript_param Purpose : compares item script params table row with cached configuration data Parameter : script - [ IN ] the cached item script dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise
static int	dbsync_compare_itemscript_param(const zbx_dc_scriptitem_param_t *scriptitem_param, const DB_ROW dbrow)
{
	if (FAIL == dbsync_compare_uint64(dbrow[1], scriptitem_param->itemid))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[2], scriptitem_param->name))
		return FAIL;
	if (FAIL == dbsync_compare_str(dbrow[3], scriptitem_param->value))
		return FAIL;
	return SUCCEED;
}
static int dbsync_compare_itemscript_param ( const zbx_dc_scriptitem_param_t * scriptitem_param , const DB_ROW dbrow ) { if ( FAIL == dbsync_compare_uint64 ( dbrow [ 1 ] , scriptitem_param -> itemid ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 2 ] , scriptitem_param -> name ) ) return FAIL ; if ( FAIL == dbsync_compare_str ( dbrow [ 3 ] , scriptitem_param -> value ) ) return FAIL ; return SUCCEED ; }
Function: dbsync_compare_itemscript_param                                  
                                                                            
 Purpose: compares item script params table row with cached configuration   
          data                                                              
                                                                            
 Parameter: script - [IN] the cached item script                            
            dbrow  - [IN] the database row                                  
                                                                            
 Return value: SUCCEED - the row matches configuration data                 
               FAIL    - otherwise
Function : dbsync_compare_itemscript_param Purpose : compares item script params table row with cached configuration data Parameter : script - [ IN ] the cached item script dbrow - [ IN ] the database row Return value : SUCCEED - the row matches configuration data FAIL - otherwise