Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndris Zeila <andris.zeila@zabbix.com>2021-03-02 21:31:53 +0300
committerAndris Zeila <andris.zeila@zabbix.com>2021-03-02 21:32:15 +0300
commitc0001ed034742b6e564fbd874baa5d42787cda3d (patch)
tree3ce7ac8978e21a350270d6b5201fabbf83bdcde8 /include/zbxeval.h
parent9f1304db396143e854839ffc66554e7ca6ed9330 (diff)
........S. [ZBXNEXT-6451] set trigger expression exception on user macro resolving failure
Diffstat (limited to 'include/zbxeval.h')
-rw-r--r--include/zbxeval.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/zbxeval.h b/include/zbxeval.h
index d09a9abfdfd..0dcad414fe2 100644
--- a/include/zbxeval.h
+++ b/include/zbxeval.h
@@ -157,8 +157,8 @@ typedef struct
}
zbx_eval_context_t;
-typedef char *(*zbx_macro_resolve_func_t)(const char *str, size_t length, zbx_uint64_t *hostids,
- int hostids_num);
+typedef int (*zbx_macro_resolve_func_t)(const char *str, size_t length, zbx_uint64_t *hostids,
+ int hostids_num, char **value, char **error);
int zbx_eval_parse_expression(zbx_eval_context_t *ctx, const char *expression, zbx_uint64_t rules, char **error);
zbx_eval_context_t *zbx_eval_parse_expression_dyn(const char *expression, zbx_uint64_t rules, char **error);
@@ -174,8 +174,8 @@ int zbx_eval_execute_ext(zbx_eval_context_t *ctx, const zbx_timespec_t *ts, zbx_
zbx_variant_t *value, char **error);
void zbx_eval_get_functionids(zbx_eval_context_t *ctx, zbx_vector_uint64_t *functionids);
void zbx_eval_get_functionids_ordered(zbx_eval_context_t *ctx, zbx_vector_uint64_t *functionids);
-void zbx_eval_expand_user_macros(const zbx_eval_context_t *ctx, zbx_uint64_t *hostids, int hostids_num,
- zbx_macro_resolve_func_t resolver_cb);
+int zbx_eval_expand_user_macros(const zbx_eval_context_t *ctx, zbx_uint64_t *hostids, int hostids_num,
+ zbx_macro_resolve_func_t resolver_cb, char **error);
void zbx_eval_set_exception(zbx_eval_context_t *ctx, char *message);
#define ZBX_EVAL_EXTRACT_FUNCTIONID 0x0001