Commits
2743
2743
func = (zbx_dbpatch_function_t *)zbx_malloc(NULL, sizeof(zbx_dbpatch_function_t));
2744
2744
func->functionid = 0;
2745
2745
func->itemid = 0;
2746
2746
func->flags = 0;
2747
2747
func->name = name;
2748
2748
func->parameter = zbx_substr(expression, data->func_param.l + 1, data->func_param.r -1);
2749
2749
2750
2750
host = zbx_substr(expression, data->host.l, data->host.r);
2751
2751
key = zbx_substr(expression, data->key.l, data->key.r);
2752
2752
2753
-
/* TODO: clarify if {HOST.HOST} should be replaced with //
2754
2753
if (0 == strcmp(host, "{HOST.HOST}"))
2755
2754
func->arg0 = zbx_dsprintf(NULL, "//%s", key);
2756
2755
else
2757
-
*/
2758
-
func->arg0 = zbx_dsprintf(NULL, "/%s/%s", host, key);
2756
+
func->arg0 = zbx_dsprintf(NULL, "/%s/%s", host, key);
2759
2757
2760
2758
zbx_vector_ptr_append(&functions, func);
2761
2759
2762
2760
dbpatch_convert_function(func, function, &functions);
2763
2761
if (NULL == *function)
2764
2762
*function = zbx_strdup(NULL, "{0}");
2765
2763
dbpatch_replace_functionids(function, &functions);
2766
2764
2767
2765
zbx_free(key);
2768
2766
zbx_free(host);