Hi,
my suggested fix for the performance counter problem on Windows
if they contain the character ']':
I think it should work for all platforms.
strchr is faster than strstr, I guess and what we need is to get the position
of the last ']', not the first ']'.
Regards,
Norbert.
my suggested fix for the performance counter problem on Windows
if they contain the character ']':
I think it should work for all platforms.
Code:
--- sysinfo.c.orig Thu May 10 12:10:28 2007
+++ sysinfo.c Fri May 11 13:49:43 2007
@@ -258,8 +258,8 @@
if(param)
zbx_strlcpy(param, "", param_max_len);
- pl = strstr(localstr, "[");
- pr = strstr(localstr, "]");
+ pl = strchr(localstr, '[');
+ pr = strrchr(localstr, ']');
if(pl > pr)
return 0;
of the last ']', not the first ']'.
Regards,
Norbert.