/[smecontribs]/rpms/zabbix/contribs9/fping3-sourceip-option.patch
ViewVC logotype

Contents of /rpms/zabbix/contribs9/fping3-sourceip-option.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu May 14 03:38:45 2020 UTC (4 years, 5 months ago) by jpp
Branch: MAIN
CVS Tags: zabbix-4_4_6-2_el6_sme, zabbix-4_4_6-1_el6_sme, zabbix-4_4_6-1_el6, HEAD
import

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed