[-]
[+]
|
Changed |
icinga-mod_gearman.changes
|
|
[-]
[+]
|
Changed |
icinga-mod_gearman.spec
^
|
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/Changes
^
|
@@ -1,5 +1,13 @@
This file documents the revision history for mod_gearman.
+1.0.6 Sat Jun 4 11:47:02 CEST 2011
+ - expand server definitions from :4730 to localhost:4730
+ - fixed latency calculation (was below zero sometimes)
+
+1.0.5 Tue May 17 17:46:36 CEST 2011
+ - added dupserver option to send_gearman and send_multi too
+ - removed warning for the passive only mode
+
1.0.4 Sun Apr 17 17:58:47 CEST 2011
- added generic logger
- enables logging to stdout, file, syslog or nagios
@@ -21,7 +29,7 @@
- fixed "make rpm" for SLES11
1.0 Mon Feb 7 11:05:29 CET 2011
- - added dup_server option (Mark Clarkson)
+ - added dupserver option (Mark Clarkson)
- added stderr to send_multi
- added missing performance data to send_multi
- added error message when using unknown option
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/README
^
|
@@ -18,11 +18,14 @@
* You need at least one http://gearman.org[Gearman Job Server] running
+http://labs.consol.de/wp-content/uploads/2010/09/Mod-Gearman.pdf[Have a look at the slides from the Nagios Workshop 2011 in Hannover]
+
+
Support & Questions
-------------------
* Mod-Gearman has been succesfully tested with Nagios 3.2.3 and Icinga
- 1.2.0 running on Gearman 0.14. There are no known bugs at the moment.
+ 1.2.0 running on Lib-Gearman 0.14. There are no known bugs at the moment.
Let me know if you find one.
* https://groups.google.com/group/mod_gearman[google groups mailinglist]
* http://labs.consol.de/lang/de/forum/#/categories/mod-gearman[support forum]
@@ -575,13 +578,13 @@
fork_on_exec=no
====
-dup_server::
+dupserver::
sets the address of gearman job server where duplicated result will be sent to.
Can be specified more than once to add more server. Useful for duplicating
results for a reporting installation or remote gui.
+
====
- dup_server=logserver:4730,logserver2:4730
+ dupserver=logserver:4730,logserver2:4730
====
@@ -770,7 +773,7 @@
Download
--------
-* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.4.tar.gz[version 1.0.4 - April 17 2011]
+* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.6.tar.gz[version 1.0.6 - June 04 2011]
* Mod Gearman is available for download at: http://labs.consol.de/nagios/mod-gearman
* The source is available at GitHub: http://github.com/sni/mod_gearman
@@ -778,6 +781,8 @@
Archive
~~~~~~~
+* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.6.tar.gz[version 1.0.6 - June 04 2011]
+* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.5.tar.gz[version 1.0.5 - May 17 2011]
* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.4.tar.gz[version 1.0.4 - April 17 2011]
* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.3.tar.gz[version 1.0.3 - March 23 2011]
* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.2.tar.gz[version 1.0.2 - March 13 2011]
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/aclocal.m4
^
|
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/common/utils.c
^
|
@@ -288,6 +288,7 @@
int parse_args_line(mod_gm_opt_t *opt, char * arg, int recursion_level) {
char *key;
char *value;
+ char temp_buffer[GM_BUFFERSIZE];
gm_log( GM_LOG_TRACE, "parse_args_line(%s, %d)\n", arg, recursion_level);
@@ -562,7 +563,14 @@
while ( (servername = strsep( &value, "," )) != NULL ) {
servername = trim(servername);
if ( strcmp( servername, "" ) ) {
- opt->server_list[opt->server_num] = strdup(servername);
+ if(strcspn(servername, ":") == 0) {
+ temp_buffer[0]='\x0';
+ snprintf( temp_buffer,sizeof( temp_buffer )-1, "localhost%s", servername);
+ temp_buffer[sizeof( temp_buffer )-1]='\x0';
+ opt->server_list[opt->server_num] = strdup(temp_buffer);
+ } else {
+ opt->server_list[opt->server_num] = strdup(servername);
+ }
opt->server_num++;
}
}
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/configure
^
|
@@ -1,13 +1,13 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for mod_gearman 1.0.4.
+# Generated by GNU Autoconf 2.65 for mod_gearman 1.0.6.
#
# Report bugs to <sven.nierlein@consol.de>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -319,7 +319,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -359,19 +359,19 @@
fi # as_fn_arith
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
+# script with status $?, using 1 if that was 0.
as_fn_error ()
{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi
- $as_echo "$as_me: error: $2" >&2
+ $as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -533,7 +533,7 @@
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -552,8 +552,8 @@
# Identity of this package.
PACKAGE_NAME='mod_gearman'
PACKAGE_TARNAME='mod_gearman'
-PACKAGE_VERSION='1.0.4'
-PACKAGE_STRING='mod_gearman 1.0.4'
+PACKAGE_VERSION='1.0.6'
+PACKAGE_STRING='mod_gearman 1.0.6'
PACKAGE_BUGREPORT='sven.nierlein@consol.de'
PACKAGE_URL=''
@@ -770,9 +770,8 @@
fi
case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -817,7 +816,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -843,7 +842,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1047,7 +1046,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1063,7 +1062,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1093,8 +1092,8 @@
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+ -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
;;
*=*)
@@ -1102,7 +1101,7 @@
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1120,13 +1119,13 @@
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
+ as_fn_error "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1149,7 +1148,7 @@
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1163,8 +1162,8 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1179,9 +1178,9 @@
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
+ as_fn_error "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
+ as_fn_error "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1220,11 +1219,11 @@
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1250,7 +1249,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures mod_gearman 1.0.4 to adapt to many kinds of systems.
+\`configure' configures mod_gearman 1.0.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1264,7 +1263,7 @@
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
+ -q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1316,7 +1315,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mod_gearman 1.0.4:";;
+ short | recursive ) echo "Configuration of mod_gearman 1.0.6:";;
esac
cat <<\_ACEOF
@@ -1413,10 +1412,10 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mod_gearman configure 1.0.4
-generated by GNU Autoconf 2.67
+mod_gearman configure 1.0.6
+generated by GNU Autoconf 2.65
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1524,7 +1523,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
+ test $ac_status = 0; } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1590,10 +1589,10 @@
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1629,7 +1628,7 @@
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -1652,15 +1651,17 @@
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## -------------------------------------- ##
+( cat <<\_ASBOX
+## -------------------------------------- ##
## Report this to sven.nierlein@consol.de ##
-## -------------------------------------- ##"
+## -------------------------------------- ##
+_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1682,7 +1683,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1713,7 +1714,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -1812,7 +1813,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1874,8 +1875,8 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mod_gearman $as_me 1.0.4, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+It was created by mod_gearman $as_me 1.0.6, which was
+generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -1985,9 +1986,11 @@
{
echo
- $as_echo "## ---------------- ##
+ cat <<\_ASBOX
+## ---------------- ##
## Cache variables. ##
-## ---------------- ##"
+## ---------------- ##
+_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2021,9 +2024,11 @@
)
echo
- $as_echo "## ----------------- ##
+ cat <<\_ASBOX
+## ----------------- ##
## Output variables. ##
-## ----------------- ##"
+## ----------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_vars
do
@@ -2036,9 +2041,11 @@
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ cat <<\_ASBOX
+## ------------------- ##
## File substitutions. ##
-## ------------------- ##"
+## ------------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_files
do
@@ -2052,9 +2059,11 @@
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ cat <<\_ASBOX
+## ----------- ##
## confdefs.h. ##
-## ----------- ##"
+## ----------- ##
+_ASBOX
echo
cat confdefs.h
echo
@@ -2109,12 +2118,7 @@
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -2129,11 +2133,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+ . "$ac_site_file"
fi
done
@@ -2209,7 +2209,7 @@
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2226,22 +2226,16 @@
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
+ for ac_t in install-sh install.sh shtool; do
+ if test -f "$ac_dir/$ac_t"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/$ac_t -c"
+ break 2
+ fi
+ done
done
if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2357,11 +2351,11 @@
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+ as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+ as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
@@ -2383,7 +2377,7 @@
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ as_fn_error "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
@@ -2393,7 +2387,7 @@
# Ok.
:
else
- as_fn_error $? "newly created file is older than distributed files!
+ as_fn_error "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2631,7 +2625,7 @@
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -2639,7 +2633,7 @@
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2673,7 +2667,7 @@
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
@@ -2689,7 +2683,7 @@
# Define the identity of the package.
PACKAGE='mod_gearman'
- VERSION='1.0.4'
+ VERSION='1.0.6'
cat >>confdefs.h <<_ACEOF
@@ -2958,8 +2952,9 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C++ compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ as_fn_set_status 77
+as_fn_error "C++ compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3001,8 +2996,8 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3059,9 +3054,9 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C++ compiled programs.
+as_fn_error "cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details." "$LINENO" 5; }
fi
fi
fi
@@ -3112,8 +3107,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -3731,8 +3726,8 @@
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4107,7 +4102,7 @@
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4404,7 +4399,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4420,11 +4415,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4463,7 +4458,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4479,18 +4474,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
fi
ac_ext=c
@@ -4551,7 +4546,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -4617,7 +4612,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -4749,7 +4744,8 @@
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4853,7 +4849,8 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -5215,13 +5212,14 @@
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
else
- as_fn_error $? "Compiling mod_gearman requires standard unix headers files" "$LINENO" 5
+ as_fn_error "Compiling mod_gearman requires standard unix headers files" "$LINENO" 5
fi
done
@@ -5235,7 +5233,7 @@
_ACEOF
else
- as_fn_error $? "Compiling mod_gearman requires ltdl.h" "$LINENO" 5
+ as_fn_error "Compiling mod_gearman requires ltdl.h" "$LINENO" 5
fi
done
@@ -5249,7 +5247,7 @@
_ACEOF
else
- as_fn_error $? "Compiling mod_gearman requires curses.h" "$LINENO" 5
+ as_fn_error "Compiling mod_gearman requires curses.h" "$LINENO" 5
fi
done
@@ -5296,7 +5294,8 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -5387,7 +5386,7 @@
LIBS="-lgearman $LIBS"
else
- as_fn_error $? "Compiling mod_gearman requires libgearman. You may specify the path by --with-gearman=path..." "$LINENO" 5
+ as_fn_error "Compiling mod_gearman requires libgearman. You may specify the path by --with-gearman=path..." "$LINENO" 5
fi
@@ -5482,7 +5481,6 @@
ac_libobjs=
ac_ltlibobjs=
-U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -5506,15 +5504,15 @@
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error $? "conditional \"AMDEP\" was never defined.
+ as_fn_error "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+ as_fn_error "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+ as_fn_error "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@@ -5664,19 +5662,19 @@
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
+# script with status $?, using 1 if that was 0.
as_fn_error ()
{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi
- $as_echo "$as_me: error: $2" >&2
+ $as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -5872,7 +5870,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -5925,8 +5923,8 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mod_gearman $as_me 1.0.4, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+This file was extended by mod_gearman $as_me 1.0.6, which was
+generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5991,11 +5989,11 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-mod_gearman config.status 1.0.4
-configured by $0, generated by GNU Autoconf 2.67,
+mod_gearman config.status 1.0.6
+configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -6013,16 +6011,11 @@
while test $# != 0
do
case $1 in
- --*=?*)
+ --*=*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
*)
ac_option=$1
ac_optarg=$2
@@ -6044,7 +6037,6 @@
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -6057,7 +6049,7 @@
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
+ as_fn_error "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -6066,7 +6058,7 @@
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
+ -*) as_fn_error "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -6124,7 +6116,7 @@
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -6162,7 +6154,7 @@
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -6179,7 +6171,7 @@
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
+ ac_cs_awk_cr='\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -6193,18 +6185,18 @@
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -6293,28 +6285,20 @@
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+ || as_fn_error "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -6342,7 +6326,7 @@
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -6427,7 +6411,7 @@
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -6440,7 +6424,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -6468,7 +6452,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -6495,7 +6479,7 @@
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -6632,22 +6616,22 @@
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
+which seems to be undefined. Please make sure it is defined." >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
+which seems to be undefined. Please make sure it is defined." >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -6658,19 +6642,19 @@
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
+ || as_fn_error "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
@@ -6820,7 +6804,7 @@
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -6841,7 +6825,7 @@
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
+ $ac_cs_success || as_fn_exit $?
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/configure.ac
^
|
@@ -3,7 +3,7 @@
##############################################
AC_PREREQ([2.59])
-AC_INIT([mod_gearman], [1.0.4], [sven.nierlein@consol.de])
+AC_INIT([mod_gearman], [1.0.6], [sven.nierlein@consol.de])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AC_CONFIG_SRCDIR([neb_module/mod_gearman.c],[worker/worker.c],[tools/send_gearman.c],[tools/check_gearman.c],[tools/gearman_top.c])
AC_CONFIG_HEADER([config.h])
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/docs/QUICKSTART
^
|
@@ -52,9 +52,9 @@
--------------------------------------
#> cd /tmp
-#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.3.tar.gz"
-#> tar zxf mod_gearman-1.0.3.tar.gz
-#> cd mod_gearman-1.0.3
+#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.6.tar.gz"
+#> tar zxf mod_gearman-1.0.6.tar.gz
+#> cd mod_gearman-1.0.6
#> ./configure --prefix=/opt --with-gearman=/opt --with-user=nagios --with-init-dir=/etc/init.d
#> make
#> make install
@@ -118,7 +118,7 @@
--------------------------------------
#> grep mod_gearman /var/log/nagios3/nagios.log
-[1295003042] mod_gearman: Version 1.0.3
+[1295003042] mod_gearman: Version 1.0.6
[1295003042] Event broker module '/opt/lib/mod_gearman/mod_gearman.o' initialized successfully.
--------------------------------------
@@ -135,18 +135,15 @@
First we have a look at '/opt/bin/gearman_top'. You should have at least one
worker for each queue.
---------------------------------------
-2011-01-07 23:23:24 - localhost:4730 - v0.14
-
-Queue Name | Worker Available | Jobs Waiting | Jobs Running
-------------------------------------------------------------------
-check_results | 1 | 0 | 0
-eventhandler | 1 | 0 | 0
-host | 1 | 0 | 0
-service | 1 | 0 | 0
-worker_debian64 | 1 | 0 | 0
-------------------------------------------------------------------
---------------------------------------
+ 2011-01-07 23:23:24 - localhost:4730 - v0.14
+ Queue Name | Worker Available | Jobs Waiting | Jobs Running
+ ------------------------------------------------------------------
+ check_results | 1 | 0 | 0
+ eventhandler | 1 | 0 | 0
+ host | 1 | 0 | 0
+ service | 1 | 0 | 0
+ worker_debian64 | 1 | 0 | 0
+ ------------------------------------------------------------------
Check-Gearman
~~~~~~~~~~~~~
@@ -155,7 +152,7 @@
--------------------------------------
#> /opt/bin/check_gearman -H localhost -q worker_`hostname` -t 10 -s check
-check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.0.3|worker=1 jobs=2c
+check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.0.6|worker=1 jobs=2c
--------------------------------------
The interesting number is the last one, '2c' in our case, which means there
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/docs/QUICKSTART.html
^
|
@@ -606,9 +606,9 @@
<div class="listingblock">
<div class="content">
<pre><tt>#> cd /tmp
-#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.3.tar.gz"
-#> tar zxf mod_gearman-1.0.3.tar.gz
-#> cd mod_gearman-1.0.3
+#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.6.tar.gz"
+#> tar zxf mod_gearman-1.0.6.tar.gz
+#> cd mod_gearman-1.0.6
#> ./configure --prefix=/opt --with-gearman=/opt --with-user=nagios --with-init-dir=/etc/init.d
#> make
#> make install
@@ -666,7 +666,7 @@
<div class="listingblock">
<div class="content">
<pre><tt>#> grep mod_gearman /var/log/nagios3/nagios.log
-[1295003042] mod_gearman: Version 1.0.3
+[1295003042] mod_gearman: Version 1.0.6
[1295003042] Event broker module '/opt/lib/mod_gearman/mod_gearman.o' initialized successfully.</tt></pre>
</div></div>
</div>
@@ -676,27 +676,24 @@
<h3 id="_gearman_top">Gearman-Top</h3><div style="clear:left"></div>
<div class="paragraph"><p>First we have a look at <em>/opt/bin/gearman_top</em>. You should have at least one
worker for each queue.</p></div>
-<div class="listingblock">
+<div class="literalblock">
<div class="content">
<pre><tt>2011-01-07 23:23:24 - localhost:4730 - v0.14
-
-Queue Name | Worker Available | Jobs Waiting | Jobs Running</tt></pre>
-</div></div>
-<div class="paragraph"><p>check_results | 1 | 0 | 0
+Queue Name | Worker Available | Jobs Waiting | Jobs Running
+------------------------------------------------------------------
+check_results | 1 | 0 | 0
eventhandler | 1 | 0 | 0
host | 1 | 0 | 0
service | 1 | 0 | 0
-worker_debian64 | 1 | 0 | 0</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><tt></tt></pre>
+worker_debian64 | 1 | 0 | 0
+------------------------------------------------------------------</tt></pre>
</div></div>
<h3 id="_check_gearman">Check-Gearman</h3><div style="clear:left"></div>
<div class="paragraph"><p>Then we have a look at the shiped check plugin:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>#> /opt/bin/check_gearman -H localhost -q worker_`hostname` -t 10 -s check
-check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.0.3|worker=1 jobs=2c</tt></pre>
+check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.0.6|worker=1 jobs=2c</tt></pre>
</div></div>
<div class="paragraph"><p>The interesting number is the last one, <em>2c</em> in our case, which means there
have been already 2 jobs executed by this worker.</p></div>
@@ -736,7 +733,7 @@
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2011-03-23 21:48:03 CEST
+Last updated 2011-05-25 17:02:58 CEST
</div>
</div>
</body>
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/docs/README.html
^
|
@@ -585,6 +585,7 @@
</p>
</li>
</ul></div>
+<div class="paragraph"><p><a href="http://labs.consol.de/wp-content/uploads/2010/09/Mod-Gearman.pdf">Have a look at the slides from the Nagios Workshop 2011 in Hannover</a></p></div>
</div>
<h2 id="_support_amp_questions">Support & Questions</h2>
<div class="sectionbody">
@@ -592,7 +593,7 @@
<li>
<p>
Mod-Gearman has been succesfully tested with Nagios 3.2.3 and Icinga
- 1.2.0 running on Gearman 0.14. There are no known bugs at the moment.
+ 1.2.0 running on Lib-Gearman 0.14. There are no known bugs at the moment.
Let me know if you find one.
</p>
</li>
@@ -1376,7 +1377,7 @@
</div></div>
</dd>
<dt class="hdlist1">
-dup_server
+dupserver
</dt>
<dd>
<p>
@@ -1388,7 +1389,7 @@
<div class="exampleblock-content">
<div class="literalblock">
<div class="content">
-<pre><tt>dup_server=logserver:4730,logserver2:4730</tt></pre>
+<pre><tt>dupserver=logserver:4730,logserver2:4730</tt></pre>
</div></div>
</div></div>
</dd>
@@ -1620,7 +1621,7 @@
<div class="ulist"><ul>
<li>
<p>
-<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.4.tar.gz">version 1.0.4 - April 17 2011</a>
+<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.6.tar.gz">version 1.0.6 - June 04 2011</a>
</p>
</li>
<li>
@@ -1638,6 +1639,16 @@
<div class="ulist"><ul>
<li>
<p>
+<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.6.tar.gz">version 1.0.6 - June 04 2011</a>
+</p>
+</li>
+<li>
+<p>
+<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.5.tar.gz">version 1.0.5 - May 17 2011</a>
+</p>
+</li>
+<li>
+<p>
<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.0.4.tar.gz">version 1.0.4 - April 17 2011</a>
</p>
</li>
@@ -1697,7 +1708,7 @@
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2011-04-18 13:00:46 CEST
+Last updated 2011-06-04 11:49:21 CEST
</div>
</div>
</body>
|
[-]
[+]
|
Added |
mod_gearman-1.0.6.tar.bz2/etc/mod_gearman.conf
^
|
@@ -0,0 +1,163 @@
+###############################################################################
+#
+# mod_gearman - distribute checks with gearman
+#
+# Copyright (c) 2010 Sven Nierlein
+#
+# Sample Worker / NEB Module Config
+#
+###############################################################################
+
+# use debug to increase the verbosity of the module.
+# Possible values are:
+# 0 = only errors
+# 1 = debug messages
+# 2 = trace messages
+# 3 = trace and all gearman related logs are going to stdout.
+# Default is 0.
+debug=0
+
+
+# sets the addess of your gearman job server. Can be specified
+# more than once to add more server.
+server=localhost:4730
+
+
+# sets the address of your 2nd (duplicate) gearman job server. Can
+# be specified more than once o add more servers.
+#dupserver=<host>:<port>
+
+
+# defines if the module should distribute execution of
+# eventhandlers.
+eventhandler=yes
+
+
+# defines if the module should distribute execution of
+# service checks.
+services=yes
+
+
+# defines if the module should distribute execution of
+# host checks.
+hosts=yes
+
+
+# sets a list of hostgroups which will go into seperate
+# queues. Either specify a comma seperated list or use
+# multiple lines.
+#hostgroups=name1
+#hostgroups=name2,name3
+
+
+# sets a list of servicegroups which will go into seperate
+# queues.
+#servicegroups=name1,name2,name3
+
+# Set this to 'no' if you want Mod-Gearman to only take care about
+# servicechecks. No hostchecks will be processed by Mod-Gearman. Use
+# this option to disable hostchecks and still have the possibility to
+# use hostgroups for easy configuration of your services.
+# If set to yes, you still have to define which hostchecks should be
+# processed by either using 'hosts' or the 'hostgroups' option.
+# Default is Yes.
+do_hostchecks=yes
+
+# enables or disables encryption. It is strongly
+# advised to not disable encryption. Anybody will be
+# able to inject packages to your worker.
+# Encryption is enabled by default and you have to
+# explicitly disable it.
+# When using encryption, you will either have to
+# specify a shared password with key=... or a
+# keyfile with keyfile=...
+# Default is On.
+encryption=yes
+
+
+# A shared password which will be used for
+# encryption of data pakets. Should be at least 8
+# bytes long. Maximum length is 32 characters.
+key=should_be_changed
+
+
+# The shared password will be read from this file.
+# Use either key or keyfile. Only the first 32
+# characters will be used.
+#keyfile=/path/to/secret.file
+
+
+###############################################################################
+#
+# NEB Module Config
+#
+# the following settings are for the neb module only and
+# will be ignored by the worker.
+#
+###############################################################################
+
+# sets a list of hostgroups which will not be executed
+# by gearman. They are just passed through.
+# Default is none
+localhostgroups=
+
+
+# sets a list of servicegroups which will not be executed
+# by gearman. They are just passed through.
+# Default is none
+localservicegroups=
+
+
+# Number of result worker threads. Usually one is
+# enough. You may increase the value if your
+# result queue is not processed fast enough.
+# Default: 1
+result_workers=1
+
+
+# defines if the module should distribute perfdata
+# to gearman.
+# Note: processing of perfdata is not part of
+# mod_gearman. You will need additional worker for
+# handling performance data. For example: pnp4nagios
+# Performance data is just written to the gearman
+# queue.
+# Default no
+perfdata=no
+
+
+###############################################################################
+#
+# Worker Config
+#
+# the following settings are for the worker only and
+# will be ignored by the neb module.
+#
+###############################################################################
+
+# Path to the pidfile. Usually set by the init script
+#pidfile=/tmp/gm/var/mod_gearman/mod_gearman_worker.pid
+
+# Path to the logfile.
+logfile=/tmp/gm/var/mod_gearman/mod_gearman_worker.log
+
+# Minimum number of worker processes which should
+# run at any time.
+min-worker=1
+
+# Maximum number of worker processes which should
+# run at any time. You may set this equal to
+# min-worker setting to disable dynamic starting of
+# workers. When setting this to 1, all services from
+# this worker will be executed one after another.
+max-worker=20
+
+# Time after which an idling worker exists
+# This parameter controls how fast your waiting workers will
+# exit if there are no jobs waiting.
+idle-timeout=30
+
+# Controls the amount of jobs a worker will do before he exits
+# Use this to control how fast the amount of workers will go down
+# after high load times
+max-jobs=50
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/etc/mod_gearman.conf.in
^
|
@@ -54,6 +54,15 @@
# queues.
#servicegroups=name1,name2,name3
+# Set this to 'no' if you want Mod-Gearman to only take care about
+# servicechecks. No hostchecks will be processed by Mod-Gearman. Use
+# this option to disable hostchecks and still have the possibility to
+# use hostgroups for easy configuration of your services.
+# If set to yes, you still have to define which hostchecks should be
+# processed by either using 'hosts' or the 'hostgroups' option.
+# Default is Yes.
+do_hostchecks=yes
+
# enables or disables encryption. It is strongly
# advised to not disable encryption. Anybody will be
# able to inject packages to your worker.
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/extras/gearmand-init
^
|
@@ -12,12 +12,12 @@
### END INIT INFO
NAME=gearmand
-DAEMON="/opt/local/sbin/gearmand"
+DAEMON="/usr/sbin/gearmand"
OPTIONS="-d -j 0"
PORT=4730
LISTEN=0.0.0.0
-PIDFILE=/opt/local/var/mod_gearman/gearmand.pid
-LOGFILE=/opt/local/var/mod_gearman/gearmand.log
+PIDFILE=/tmp/gm/var/mod_gearman/gearmand.pid
+LOGFILE=/tmp/gm/var/mod_gearman/gearmand.log
USER=sven
GRACEFUL_SHUTDOWN_TIME=30
LIBEVENTMINVERSION=1.4
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/include/common.h
^
|
@@ -52,7 +52,7 @@
#define MOD_GM_COMMON_H
/* constants */
-#define GM_VERSION "1.0.4"
+#define GM_VERSION "1.0.6"
#define GM_ENABLED 1
#define GM_DISABLED 0
#define GM_BUFFERSIZE 98304
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/include/send_gearman.h
^
|
@@ -44,7 +44,7 @@
/** send_gearman
*
- * main function of gearman_top
+ * main function of send_gearman
*
* @param[in] argc - number of arguments
* @param[in] argv - list of arguments
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/neb_module/mod_gearman.c
^
|
@@ -742,28 +742,6 @@
opt->events = GM_ENABLED;
}
- if( opt->servicegroups_num == 0
- && opt->hostgroups_num == 0
- && opt->exports_count == 0
- && opt->hosts == GM_DISABLED
- && opt->services == GM_DISABLED
- && opt->events == GM_DISABLED
- && opt->perfdata == GM_DISABLED
- ) {
- gm_log( GM_LOG_ERROR, "loading Mod-Gearman NEB module without any queues is useless\n" );
- return(GM_ERROR);
- }
-
- /* do we need a result thread? */
- if( opt->servicegroups_num == 0
- && opt->hostgroups_num == 0
- && opt->hosts == GM_DISABLED
- && opt->services == GM_DISABLED
- ) {
- gm_log( GM_LOG_DEBUG, "disabled unused result threads\n" );
- mod_gm_opt->result_workers = 0;
- }
-
return(GM_OK);
}
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/neb_module/result_thread.c
^
|
@@ -232,7 +232,14 @@
finishtime_f = (double)chk_result->finish_time.tv_sec + (double)chk_result->finish_time.tv_usec / 1000000;
exec_time = finishtime_f - starttime_f;
latency = now_f - exec_time - core_starttime_f;
- chk_result->latency += latency;
+
+ if(latency < 0)
+ latency = 0;
+ if(chk_result->latency < 0)
+ chk_result->latency = 0;
+
+ chk_result->latency += latency;
+
#ifdef GM_DEBUG
if(chk_result->latency > 1000)
write_debug_file(&decrypted_orig);
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/t/01-utils.c
^
|
@@ -18,14 +18,14 @@
}
int main(void) {
- plan(42);
+ plan(44);
/* lowercase */
char test[100];
ok(lc(NULL) == NULL, "lc(NULL)");
- strcpy(test, "Yes"); ok(strcmp(lc(test), "yes") == 0, "lc(yes)");
- strcpy(test, "YES"); ok(strcmp(lc(test), "yes") == 0, "lc(YES)");
- strcpy(test, "yeS"); ok(strcmp(lc(test), "yes") == 0, "lc(yeS)");
+ strcpy(test, "Yes"); like(lc(test), "yes", "lc(yes)");
+ strcpy(test, "YES"); like(lc(test), "yes", "lc(YES)");
+ strcpy(test, "yeS"); like(lc(test), "yes", "lc(yeS)");
/* parse_yes_or_no */
@@ -46,7 +46,7 @@
/* trim */
ok(trim(NULL) == NULL, "trim(NULL)");
- strcpy(test, " test "); ok(strcmp(trim(test), "test") == 0, "trim(' test ')");
+ strcpy(test, " test "); like(trim(test), "test", "trim(' test ')");
/* reading keys */
mod_gm_opt_t *mod_gm_opt;
@@ -64,20 +64,17 @@
snprintf(hex, 4, "%02x", mod_gm_opt->crypt_key[i]);
strncat(test, hex, 4);
}
- if(!ok(strcmp(test, "3131313131313131313131313131313131313131313131313131313131310000") == 0, "read keyfile t/data/test1.key"))
- diag("expected: '3131313131313131313131313131313131313131313131313131313131310000'\n but got: '%s'", test );
+ like(test, "3131313131313131313131313131313131313131313131313131313131310000", "read keyfile t/data/test1.key");
mod_gm_opt->keyfile = "t/data/test2.key";
read_keyfile(mod_gm_opt);
- //printf_hex(mod_gm_opt->crypt_key, 32);
- if(!ok(strcmp(mod_gm_opt->crypt_key, "abcdef") == 0, "reading keyfile t/data/test2.key"))
- diag("expected: 'abcdef'\n but got: '%s'", mod_gm_opt->crypt_key );
+
+ like(mod_gm_opt->crypt_key, "abcdef", "reading keyfile t/data/test2.key");
mod_gm_opt->keyfile = "t/data/test3.key";
read_keyfile(mod_gm_opt);
//printf_hex(mod_gm_opt->crypt_key, 32);
- if(!ok(strcmp(mod_gm_opt->crypt_key, "11111111111111111111111111111111") == 0, "reading keyfile t/data/test3.key"))
- diag("expected: '11111111111111111111111111111111'\n but got: '%s'", mod_gm_opt->crypt_key );
+ like(mod_gm_opt->crypt_key, "11111111111111111111111111111111", "reading keyfile t/data/test3.key");
ok(strlen(mod_gm_opt->crypt_key) == 32, "key size for t/data/test3.key");
@@ -90,14 +87,12 @@
int len;
len = mod_gm_encrypt(&encrypted, text, GM_ENCODE_AND_ENCRYPT);
ok(len == 24, "length of encrypted only");
- if(!ok(!strcmp(encrypted, base), "encrypted string"))
- diag("expected: '%s' but got: '%s'", base, encrypted);
+ like(encrypted, base, "encrypted string");
/* decrypt */
char * decrypted = malloc(GM_BUFFERSIZE);
mod_gm_decrypt(&decrypted, encrypted, GM_ENCODE_AND_ENCRYPT);
- if(!ok(!strcmp(decrypted, text), "decrypted text"))
- diag("expected: '%s' but got: '%s'", text, decrypted);
+ like(decrypted, text, "decrypted text");
free(decrypted);
free(encrypted);
@@ -105,13 +100,12 @@
char * base64 = malloc(GM_BUFFERSIZE);
len = mod_gm_encrypt(&base64, text, GM_ENCODE_ONLY);
ok(len == 16, "length of encode only");
- ok(!strcmp(base64, "dGVzdCBtZXNzYWdl"), "base64 only string");
+ like(base64, "dGVzdCBtZXNzYWdl", "base64 only string");
/* debase 64 */
char * debase64 = malloc(GM_BUFFERSIZE);
mod_gm_decrypt(&debase64, base64, GM_ENCODE_ONLY);
- if(!ok(!strcmp(debase64, text), "debase64 text"))
- diag("expected: '%s' but got: '%s'", text, debase64);
+ like(debase64, text, "debase64 text");
free(debase64);
free(base64);
@@ -122,13 +116,11 @@
/* nr2signal */
char * signame1 = nr2signal(9);
- if(!ok(!strcmp(signame1, "SIGKILL"), "get SIGKILL for 9"))
- diag("expected: 'SIGKILL' but got: '%s'", signame1);
+ like(signame1, "SIGKILL", "get SIGKILL for 9");
free(signame1);
char * signame2 = nr2signal(15);
- if(!ok(!strcmp(signame2, "SIGTERM"), "get SIGTERM for 15"))
- diag("expected: 'SIGTERM' but got: '%s'", signame2);
+ like(signame2, "SIGTERM", "get SIGTERM for 15");
free(signame2);
@@ -150,6 +142,15 @@
ok(t.tv_sec == 0, "string2timeval 7");
ok(t.tv_usec == 0, "string2timeval 8");
+ /* command line parsing */
+ strcpy(test, "server=host:4730");
+ parse_args_line(mod_gm_opt, test, 0);
+ like(mod_gm_opt->server_list[0], "host:4730", "server=host:4730");
+
+ strcpy(test, "server=:4730");
+ parse_args_line(mod_gm_opt, test, 0);
+ like(mod_gm_opt->server_list[1], "localhost:4730", "server=:4730");
+
return exit_status();
}
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/t/02-full.c
^
|
@@ -30,8 +30,8 @@
if(pid == 0) {
sid = setsid();
char port[30];
- snprintf(port, 30, "-p %d", GEARMAND_TEST_PORT);
- execlp("gearmand", "gearmand", "-t 10", "-j 0", port, (char *)NULL);
+ snprintf(port, 30, "--port=%d", GEARMAND_TEST_PORT);
+ execlp("gearmand", "gearmand", "--threads=10", "--job-retries=0", port, "--verbose=5", (char *)NULL);
perror("gearmand");
exit(1);
}
@@ -179,7 +179,7 @@
diag( "waitpid() %d exited with %d\n", chld, status);
}
- if(!ok(gearmand_pid > 0, "'gearmand -t 10 -j 0 -p %d -v -v -v' started with pid: %d", GEARMAND_TEST_PORT, gearmand_pid)) {
+ if(!ok(gearmand_pid > 0, "'gearmand --threads=10 --job-retries=0 --port=%d --verbose=5' started with pid: %d", GEARMAND_TEST_PORT, gearmand_pid)) {
diag("make sure gearmand is in your PATH. Common locations are /usr/sbin or /usr/local/sbin");
exit( EXIT_FAILURE );
}
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/t/03-exec_checks.c
^
|
@@ -31,55 +31,44 @@
char *argv[MAX_CMD_ARGS];
strcpy(cmd, "/bin/true");
parse_command_line(cmd, argv);
- if(!ok(argv[0] == cmd, "parsing args cmd 1"))
- diag("expected '%s' but got '%s'", cmd, argv[0]);
+ like(argv[0], cmd, "parsing args cmd 1");
/*****************************************
* arg parsing test 2
*/
strcpy(cmd, "/bin/cmd blah blub foo");
parse_command_line(cmd,argv);
- if(!ok(!strcmp(argv[0], "/bin/cmd"), "parsing args cmd 2"))
- diag("expected '/bin/cmd' but got '%s'", argv[0]);
- if(!ok(!strcmp(argv[1], "blah"), "parsing args cmd 2"))
- diag("expected 'blah' but got '%s'", argv[1]);
- if(!ok(!strcmp(argv[2], "blub"), "parsing args cmd 2"))
- diag("expected 'blub' but got '%s'", argv[2]);
- if(!ok(!strcmp(argv[3], "foo"), "parsing args cmd 2"))
- diag("expected 'foo' but got '%s'", argv[3]);
+ like(argv[0], "/bin/cmd", "parsing args cmd 2");
+ like(argv[1], "blah", "parsing args cmd 2");
+ like(argv[2], "blub", "parsing args cmd 2");
+ like(argv[3], "foo", "parsing args cmd 2");
/*****************************************
* simple test command 1
*/
strcpy(cmd, "/bin/true");
rc = run_check(cmd, &result);
- if(!ok(rc == 0, "pclose for cmd '%s' returned rc %d", cmd, rc))
- diag("cmd: '%s' returned %d", cmd, rc);
+ cmp_ok(rc, "==", 0, "pclose for cmd '%s' returned rc %d", cmd, rc);
rrc = real_exit_code(rc);
- if(!ok(rrc == 0, "cmd '%s' returned rc %d", cmd, rrc))
- diag("cmd: '%s' returned %d", cmd, rrc);
+ cmp_ok(rrc, "==", 0, "cmd '%s' returned rc %d", cmd, rrc);
/*****************************************
* simple test command 2
*/
strcpy(cmd, "/bin/true 2>&1");
rc = run_check(cmd, &result);
- if(!ok(rc == 0, "pclose for cmd '%s' returned rc %d", cmd, rc))
- diag("cmd: '%s' returned %d", cmd, rc);
+ cmp_ok(rc, "==", 0, "pclose for cmd '%s' returned rc %d", cmd, rc);
rrc = real_exit_code(rc);
- if(!ok(rrc == 0, "cmd '%s' returned rc %d", cmd, rrc))
- diag("cmd: '%s' returned %d", cmd, rrc);
+ cmp_ok(rrc, "==", 0, "cmd '%s' returned rc %d", cmd, rrc);
/*****************************************
* simple test command 3
*/
strcpy(cmd, "/usr/lib/nagios/plugins/check_icmp -H 127.0.0.1");
rc = run_check(cmd, &result);
- if(!ok(rc == 0, "pclose for cmd '%s' returned rc %d", cmd, rc))
- diag("cmd: '%s' returned %d", cmd, rc);
+ cmp_ok(rc, "==", 0, "pclose for cmd '%s' returned rc %d", cmd, rc);
rrc = real_exit_code(rc);
- if(!ok(rrc == 0, "cmd '%s' returned rc %d", cmd, rrc))
- diag("cmd: '%s' returned %d", cmd, rrc);
+ cmp_ok(rrc, "==", 0, "cmd '%s' returned rc %d", cmd, rrc);
/*****************************************
* simple test command 4
@@ -87,10 +76,8 @@
strcpy(cmd, "echo -n 'test'; exit 2");
rc = run_check(cmd, &result);
rrc = real_exit_code(rc);
- if(!ok(rrc == 2, "cmd '%s' returned rc %d", cmd, rrc))
- diag("cmd: '%s' returned %d", cmd, rrc);
- if(!ok(!strcmp(result, "test"), "returned result string"))
- diag("expected 'test' but got '%s'", result);
+ cmp_ok(rrc, "==", 2, "cmd '%s' returned rc %d", cmd, rrc);
+ like(result, "test", "returned result string");
gm_job_t * exec_job;
exec_job = ( gm_job_t * )malloc( sizeof *exec_job );
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/t/tap.c
^
|
@@ -9,13 +9,6 @@
static int current_test;
static char *todo_mesg;
-void
-plan (int tests) {
- expected_tests = tests;
- if (tests != NO_PLAN)
- printf("1..%d\n", tests);
-}
-
static char *
vstrdupf (const char *fmt, va_list args) {
char *str;
@@ -31,6 +24,24 @@
return str;
}
+void
+cplan (int tests, const char *fmt, ...) {
+ expected_tests = tests;
+ if (tests == SKIP_ALL) {
+ char *why;
+ va_list args;
+ va_start(args, fmt);
+ why = vstrdupf(fmt, args);
+ va_end(args);
+ printf("1..0 ");
+ note("SKIP %s\n", why);
+ exit(0);
+ }
+ if (tests != NO_PLAN) {
+ printf("1..%d\n", tests);
+ }
+}
+
int
vok_at_loc (const char *file, int line, int test, const char *fmt,
va_list args)
@@ -205,6 +216,18 @@
return retval;
}
+int
+bail_out (int ignore, const char *fmt, ...) {
+ va_list args;
+ va_start(args, fmt);
+ printf("Bail out! ");
+ vprintf(fmt, args);
+ printf("\n");
+ va_end(args);
+ exit(255);
+ return 0;
+}
+
void
skippy (int n, const char *fmt, ...) {
char *why;
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/t/tap.h
^
|
@@ -1,46 +1,46 @@
#ifndef __TAP_H__
#define __TAP_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef va_copy
+#define va_copy(d,s) ((d) = (s))
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
-#define NO_PLAN -1
-#define ok(...) ok_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
-#define pass(...) ok(1, ## __VA_ARGS__)
-#define fail(...) ok(0, ## __VA_ARGS__)
-#define is(...) is_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
-#define isnt(...) isnt_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
-#define cmp_ok(...) cmp_ok_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
-
int vok_at_loc (const char *file, int line, int test, const char *fmt,
va_list args);
-void plan (int tests);
int ok_at_loc (const char *file, int line, int test, const char *fmt,
...);
-int diag (const char *fmt, ...);
-int note (const char *fmt, ...);
-int exit_status (void);
-void skippy (int n, const char *fmt, ...);
-void ctodo (int ignore, const char *fmt, ...);
-void cendtodo (void);
int is_at_loc (const char *file, int line, const char *got,
const char *expected, const char *fmt, ...);
int isnt_at_loc (const char *file, int line, const char *got,
const char *expected, const char *fmt, ...);
int cmp_ok_at_loc (const char *file, int line, int a, const char *op,
int b, const char *fmt, ...);
+int bail_out (int ignore, const char *fmt, ...);
+void cplan (int tests, const char *fmt, ...);
+int diag (const char *fmt, ...);
+int note (const char *fmt, ...);
+int exit_status (void);
+void skippy (int n, const char *fmt, ...);
+void ctodo (int ignore, const char *fmt, ...);
+void cendtodo (void);
-#ifdef _WIN32
-#define like(...) skippy(1, "like is not implemented on MSWin32")
-#define unlike(...) like()
-#else
-#define like(...) like_at_loc(1, __FILE__, __LINE__, __VA_ARGS__, NULL)
-#define unlike(...) like_at_loc(0, __FILE__, __LINE__, __VA_ARGS__, NULL)
-int like_at_loc (int for_match, const char *file, int line,
- const char *got, const char *expected,
- const char *fmt, ...);
-#endif
+#define NO_PLAN -1
+#define SKIP_ALL -2
+#define ok(...) ok_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
+#define is(...) is_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
+#define isnt(...) isnt_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
+#define cmp_ok(...) cmp_ok_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
+#define plan(...) cplan(__VA_ARGS__, NULL)
+#define done_testing return exit_status()
+#define BAIL_OUT(...) bail_out(0, ## __VA_ARGS__, NULL)
#define skip(test, ...) do {if (test) {skippy(__VA_ARGS__, NULL); break;}
#define endskip } while (0)
@@ -48,38 +48,57 @@
#define todo(...) ctodo(0, ## __VA_ARGS__, NULL)
#define endtodo cendtodo()
-#define dies_ok(code, ...) dies_ok_common(code, 1, ## __VA_ARGS__)
-#define lives_ok(code, ...) dies_ok_common(code, 0, ## __VA_ARGS__)
+#define dies_ok(...) dies_ok_common(1, ## __VA_ARGS__)
+#define lives_ok(...) dies_ok_common(0, ## __VA_ARGS__)
#ifdef _WIN32
+#define pass(...) ok_at_loc(__FILE__, __LINE__, 1, __VA_ARGS__, NULL)
+#define fail(...) ok_at_loc(__FILE__, __LINE__, 0, __VA_ARGS__, NULL)
+#define like(...) skippy(1, "like is not implemented on MSWin32")
+#define unlike(...) like()
#define dies_ok_common(...) \
skippy(1, "Death detection is not supported on MSWin32")
#else
+#define pass(...) ok(1, ## __VA_ARGS__)
+#define fail(...) ok(0, ## __VA_ARGS__)
+#define like(...) like_at_loc(1, __FILE__, __LINE__, __VA_ARGS__, NULL)
+#define unlike(...) like_at_loc(0, __FILE__, __LINE__, __VA_ARGS__, NULL)
+int like_at_loc (int for_match, const char *file, int line,
+ const char *got, const char *expected,
+ const char *fmt, ...);
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int tap_test_died (int status);
-#define dies_ok_common(code, for_death, ...) \
+#define dies_ok_common(for_death, code, ...) \
do { \
tap_test_died(1); \
int cpid = fork(); \
switch (cpid) { \
case -1: \
perror("fork error"); \
- exit(EXIT_FAILURE); \
- case 0: /* child */ \
- close(1); close(2); \
+ exit(1); \
+ case 0: \
+ close(1); \
+ close(2); \
code \
tap_test_died(0); \
- exit(EXIT_SUCCESS); \
+ exit(0); \
} \
if (waitpid(cpid, NULL, 0) < 0) { \
perror("waitpid error"); \
- exit(EXIT_FAILURE); \
+ exit(1); \
} \
int it_died = tap_test_died(0); \
- if (!it_died) {code} \
+ if (!it_died) \
+ {code} \
ok(for_death ? it_died : !it_died, ## __VA_ARGS__); \
} while (0)
#endif
+
+#ifdef __cplusplus
+}
#endif
+
+#endif
+
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/tools/send_gearman.c
^
|
@@ -27,6 +27,7 @@
#include "gearman.h"
gearman_client_st client;
+gearman_client_st client_dup;
/* work starts here */
int main (int argc, char **argv) {
@@ -58,11 +59,19 @@
exit( EXIT_FAILURE );
}
+ /* create duplicate client */
+ if ( create_client_dup( mod_gm_opt->dupserver_list, &client_dup ) != GM_OK ) {
+ gm_log( GM_LOG_ERROR, "cannot start client for duplicate server\n" );
+ exit( EXIT_FAILURE );
+ }
+
/* send result message */
signal(SIGALRM, alarm_sighandler);
rc = send_result();
gearman_client_free( &client );
+ if( mod_gm_opt->dupserver_num )
+ gearman_client_free( &client_dup );
mod_gm_free_opt(mod_gm_opt);
exit( rc );
}
@@ -260,6 +269,24 @@
TRUE
) == GM_OK) {
gm_log( GM_LOG_TRACE, "send_result_back() finished successfully\n" );
+
+ if( mod_gm_opt->dupserver_num ) {
+ if(add_job_to_queue( &client,
+ mod_gm_opt->dupserver_list,
+ mod_gm_opt->result_queue,
+ NULL,
+ temp_buffer1,
+ GM_JOB_PRIO_NORMAL,
+ GM_DEFAULT_JOB_RETRIES,
+ mod_gm_opt->transportmode,
+ TRUE
+ ) == GM_OK) {
+ gm_log( GM_LOG_TRACE, "send_result_back() finished successfully for duplicate server.\n" );
+ }
+ else {
+ gm_log( GM_LOG_TRACE, "send_result_back() finished unsuccessfully for duplicate server\n" );
+ }
+ }
}
else {
gm_log( GM_LOG_TRACE, "send_result_back() finished unsuccessfully\n" );
|
[-]
[+]
|
Changed |
mod_gearman-1.0.6.tar.bz2/tools/send_multi.c
^
|
@@ -28,6 +28,7 @@
#include "gearman.h"
gearman_client_st client;
+gearman_client_st client_dup;
/* work starts here */
int main (int argc, char **argv) {
@@ -59,6 +60,12 @@
exit(2);
}
+ /* create duplicate client */
+ if ( create_client_dup( mod_gm_opt->dupserver_list, &client_dup ) != GM_OK ) {
+ gm_log( GM_LOG_ERROR, "cannot start client for duplicate server\n" );
+ exit( EXIT_FAILURE );
+ }
+
/* send result message */
signal(SIGALRM, alarm_sighandler);
rc = read_multi_stream(stdin);
@@ -76,6 +83,8 @@
}
gearman_client_free( &client );
+ if( mod_gm_opt->dupserver_num )
+ gearman_client_free( &client_dup );
mod_gm_free_opt(mod_gm_opt);
exit( rc );
}
@@ -249,6 +258,24 @@
TRUE
) == GM_OK) {
gm_log( GM_LOG_TRACE, "send_result_back() finished successfully\n" );
+
+ if( mod_gm_opt->dupserver_num ) {
+ if(add_job_to_queue( &client,
+ mod_gm_opt->dupserver_list,
+ mod_gm_opt->result_queue,
+ NULL,
+ temp_buffer1,
+ GM_JOB_PRIO_NORMAL,
+ GM_DEFAULT_JOB_RETRIES,
+ mod_gm_opt->transportmode,
+ TRUE
+ ) == GM_OK) {
+ gm_log( GM_LOG_TRACE, "send_result_back() finished successfully for duplicate server.\n" );
+ }
+ else {
+ gm_log( GM_LOG_TRACE, "send_result_back() finished unsuccessfully for duplicate server\n" );
+ }
+ }
}
else {
gm_log( GM_LOG_TRACE, "send_result_back() finished unsuccessfully\n" );
|