[packages/nagios-plugin-check_sphinx] SphinxClient expects port to be integer

glen glen at pld-linux.org
Mon Oct 21 23:06:25 CEST 2013


commit f8750c9eae33da952c4664eac6b30240fbb39af9
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Oct 22 00:06:05 2013 +0300

    SphinxClient expects port to be integer

 check_sphinx.php                | 2 +-
 nagios-plugin-check_sphinx.spec | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/nagios-plugin-check_sphinx.spec b/nagios-plugin-check_sphinx.spec
index 3c56ede..692ddcd 100644
--- a/nagios-plugin-check_sphinx.spec
+++ b/nagios-plugin-check_sphinx.spec
@@ -4,7 +4,7 @@
 Summary:	Nagios plugin to check Sphinx search engine status
 Name:		nagios-plugin-%{plugin}
 Version:	1.0
-Release:	2
+Release:	3
 License:	GPL v2+
 Group:		Networking
 Source0:	%{plugin}.php
@@ -31,7 +31,7 @@ Nagios plugin to check Sphinx search engine status.
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
 install -p %{SOURCE0} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
-cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/check_sphinx.php b/check_sphinx.php
index a8b4119..fe6175e 100644
--- a/check_sphinx.php
+++ b/check_sphinx.php
@@ -54,7 +54,7 @@ if (empty($opt['H']) || empty($opt['s'])) {
 }
 
 $sphinx = new SphinxClient();
-$sphinx->SetServer($opt['H'], $opt['p']);
+$sphinx->SetServer($opt['H'], (int )$opt['p']);
 #$sphinx->setMatchMode(SPH_MATCH_ANY);
 $sphinx->SetConnectTimeout($opt['t']);
 $sphinx->setMaxQueryTime($opt['t']);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_sphinx.git/commitdiff/f8750c9eae33da952c4664eac6b30240fbb39af9



More information about the pld-cvs-commit mailing list