1 |
diff -Nru zabbix-3.0.2.orig/src/libs/zbxicmpping/icmpping.c zabbix-3.0.2/src/libs/zbxicmpping/icmpping.c |
2 |
--- zabbix-3.0.2.orig/src/libs/zbxicmpping/icmpping.c 2016-04-20 18:51:21.000000000 +0900 |
3 |
+++ zabbix-3.0.2/src/libs/zbxicmpping/icmpping.c 2016-04-20 22:28:59.000000000 +0900 |
4 |
@@ -42,34 +42,7 @@ |
5 |
|
6 |
static void get_source_ip_option(const char *fping, const char **option, unsigned char *checked) |
7 |
{ |
8 |
- FILE *f; |
9 |
- char *p, tmp[MAX_STRING_LEN]; |
10 |
- |
11 |
- zbx_snprintf(tmp, sizeof(tmp), "%s -h 2>&1", fping); |
12 |
- |
13 |
- if (NULL == (f = popen(tmp, "r"))) |
14 |
- return; |
15 |
- |
16 |
- while (NULL != fgets(tmp, sizeof(tmp), f)) |
17 |
- { |
18 |
- for (p = tmp; isspace(*p); p++) |
19 |
- ; |
20 |
- |
21 |
- if ('-' == p[0] && 'I' == p[1] && (isspace(p[2]) || ',' == p[2])) |
22 |
- { |
23 |
- *option = "-I"; |
24 |
- continue; |
25 |
- } |
26 |
- |
27 |
- if ('-' == p[0] && 'S' == p[1] && (isspace(p[2]) || ',' == p[2])) |
28 |
- { |
29 |
- *option = "-S"; |
30 |
- break; |
31 |
- } |
32 |
- } |
33 |
- |
34 |
- pclose(f); |
35 |
- |
36 |
+ *option = "-S"; |
37 |
*checked = 1; |
38 |
} |
39 |
|