zabbix-agent2/src/libs/zbxdbcache/dbsync.c
/******************************************************************************
 *                                                                            *
 * Function: encode_expression                                                *
 *                                                                            *
 * Purpose: encode serialized expression to be returned as db field           *
 *                                                                            *
 * Parameter: sync - [OUT] the changeset                                      *
 *                                                                            *
 * Return value: SUCCEED - the changeset was successfully calculated          *
 *               FAIL    - otherwise                                          *
 *                                                                            *
 ******************************************************************************/
encode_expression

Purpose: encode serialized expression to be returned as db field

Parameter: sync - [OUT] the changeset

Return value: SUCCEED - the changeset was successfully calculated
FAIL    - otherwise
encode_expression Purpose : encode serialized expression to be returned as db field Parameter : sync - [ OUT ] the changeset Return value : SUCCEED - the changeset was successfully calculated FAIL - otherwise
static char	*encode_expression(const zbx_eval_context_t *ctx)
{
	unsigned char	*data;
	size_t		len;
	char		*str = NULL;
	len = zbx_eval_serialize(ctx, NULL, &data);
	str_base64_encode_dyn((const char *)data, &str, len);
	zbx_free(data);
	return str;
}
static char * encode_expression ( const zbx_eval_context_t * ctx ) { unsigned char * data ; size_t len ; char * str = NULL ; len = zbx_eval_serialize ( ctx , NULL , & data ) ; str_base64_encode_dyn ( ( const char * ) data , & str , len ) ; zbx_free ( data ) ; return str ; }
Function: encode_expression                                                
                                                                            
 Purpose: encode serialized expression to be returned as db field           
                                                                            
 Parameter: sync - [OUT] the changeset                                      
                                                                            
 Return value: SUCCEED - the changeset was successfully calculated          
               FAIL    - otherwise
Function : encode_expression Purpose : encode serialized expression to be returned as db field Parameter : sync - [ OUT ] the changeset Return value : SUCCEED - the changeset was successfully calculated FAIL - otherwise