Commits

Marek Denis  committed d2c66f5

Channel DionaeaHarvester can now harvest data within specified dates/intervals

  • Participants
  • Parent commits 3a01a5f

Comments (0)

Files changed (33)

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	chmod -R a-w $(distdir); chmod u+w $(distdir)
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
 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'.])])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
 # 
 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 #
 # ----------------------------------
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
 		AC_MSG_RESULT([no])
 		PKG_CONFIG=""
 	fi
-		
 fi[]dnl
 ])# PKG_PROG_PKG_CONFIG
 
 # Check to see whether a particular set of modules exists.  Similar
 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
 #
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
 # --------------------------------------------------------------
 AC_DEFUN([PKG_CHECK_EXISTS],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 if test -n "$PKG_CONFIG" && \
     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
+  m4_default([$2], [:])
 m4_ifvaln([$3], [else
   $3])dnl
 fi])
 
-
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-			 [pkg_failed=yes])
-    fi
-else
-	pkg_failed=untried
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
 fi[]dnl
 ])# _PKG_CONFIG
 
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
         else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-	ifelse([$4], , [AC_MSG_ERROR(dnl
+	m4_default([$4], [AC_MSG_ERROR(
 [Package requirements ($2) were not met:
 
 $$1_PKG_ERRORS
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-_PKG_TEXT
-])],
-		[AC_MSG_RESULT([no])
-                $4])
+_PKG_TEXT])[]dnl
+        ])
 elif test $pkg_failed = untried; then
-	ifelse([$4], , [AC_MSG_FAILURE(dnl
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
 _PKG_TEXT
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-		[$4])
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
 else
 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
         AC_MSG_RESULT([yes])
-	ifelse([$3], , :, [$3])
+	$3
 fi[]dnl
 ])# PKG_CHECK_MODULES
 

File conf/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File conf/quechua.conf.dist

             password="secret";
             hostname="hostname";
             database="db";
+            interval="1D" // same as schedule                                                                                  
+            from=""; // YYYY-MM-DD HH24:mm:ss
+            to=""; // YYYY-MM-DD HH24:mm:ss
         };
     };
 

File config.guess

 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-06-10'
+timestamp='2009-12-30'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	eval $set_cc_for_build
 	SUN_ARCH="i386"
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
     	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
-	    EM64T | authenticamd | genuineintel)
+	    authenticamd | genuineintel | EM64T)
 		echo x86_64-unknown-interix${UNAME_RELEASE}
 		exit ;;
 	    IA64)
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
     frv:Linux:*:*)
     	echo frv-unknown-linux-gnu
 	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
 	#endif
 	#endif
 EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
     or32:Linux:*:*)
 	echo or32-unknown-linux-gnu
 	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
     padre:Linux:*:*)
 	echo sparc-unknown-linux-gnu
 	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
 	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
     xtensa*:Linux:*:*)
     	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
 	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-06-11'
+timestamp='2010-01-22'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
+	-apple | -axis | -knuth | -cray | -microblaze)
 		os=
 		basic_machine=$1
 		;;
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
+	| rx \
 	| score \
 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
 	| spu | strongarm \
 	| tahoe | thumb | tic4x | tic80 | tron \
+	| ubicom32 \
 	| v850 | v850e \
 	| we32k \
 	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
+	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
 		os=-none
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
-	| romp-* | rs6000-* \
+	| romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
 	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile-* | tilegx-* \
 	| tron-* \
+	| ubicom32-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+        microblaze)
+		basic_machine=microblaze-xilinx
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
 		basic_machine=tic6x-unknown
 		os=-coff
 		;;
+        # This must be matched before tile*.
+        tilegx*)
+		basic_machine=tilegx-unknown
+		os=-linux-gnu
+		;;
 	tile*)
 		basic_machine=tile-unknown
 		os=-linux-gnu
         # First match some system type aliases
         # that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
+        -auroraux)
+	        os=-auroraux
+		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -kopensolaris* \
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
 	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
 	-dicos*)
 		os=-dicos
 		;;
+        -nacl*)
+	        ;;
 	-none)
 		;;
 	*)

File include/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File include/python-interface.h

     static inline void init();
     static void finalize();
     static int convert_to_seconds(const string_t& time);
-    static void calculate_date_ranges(const string_t& time,string_t& from, string_t& to);
+    static void calculate_ranges_from_interval(const string_t& time,string_t& from, string_t& to);
+    static void format_dates_from_input(const string_t& input_from, const string_t& input_to,
+                                        string_t& output_from, string_t& output_to);
+    static void sqlize_date_string(const string_t& input_date, string_t& output_date);
  private:
     static int initialized;
 };

File include/workflow.h

      void schedule_cb(ev::periodic &watcher, int revents);
      void schedule_iterate_cb(ev::periodic &watcher, int revents);
 
-     int  calculate_scheduled_period(const string_t& time);
+     //int  calculate_scheduled_period(const string_t& time);
      void check_working_type();
 };
 
 #       compiler:		$LTCC
 #       compiler flags:		$LTCFLAGS
 #       linker:		$LD (gnu? $with_gnu_ld)
-#       $progname:		(GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
+#       $progname:		(GNU libtool) 2.2.6b Debian-2.2.6b-2
 #       automake:		$automake_version
 #       autoconf:		$autoconf_version
 #
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
+VERSION="2.2.6b Debian-2.2.6b-2"
 TIMESTAMP=""
 package_revision=1.3017
 

File modules/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/algorithm/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/algorithm/apriori/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/algorithm/stub/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/channel/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/channel/dionaeaHarvester/Makefile.am

 AM_LDFLAGS+= `pkg-config --libs libpqxx`
 
 
-pkglib_LTLIBRARIES = dnchan.la
+pkglib_LTLIBRARIES = dionaeaHarvester.la
 
-#dnchan_la_SOURCES = dionaeaHarvester.cc ../../../src/interface.cc ../../../src/python-interface.cc ../../../src/quechua.cc selects.cc
+#dionaeaHarvester_la_SOURCES = dionaeaHarvester.cc ../../../src/interface.cc ../../../src/python-interface.cc ../../../src/quechua.cc selects.cc
 
-dnchan_la_SOURCES=dionaeaHarvester.cc
-dnchan_la_SOURCES+=../../../src/interface.cc
-dnchan_la_SOURCES+=../../../src/python-interface.cc
-dnchan_la_SOURCES+=../../../src/quechua.cc
-dnchan_la_SOURCES+=selects.cc
+dionaeaHarvester_la_SOURCES=dionaeaHarvester.cc
+dionaeaHarvester_la_SOURCES+=../../../src/interface.cc
+dionaeaHarvester_la_SOURCES+=../../../src/python-interface.cc
+dionaeaHarvester_la_SOURCES+=../../../src/quechua.cc
+dionaeaHarvester_la_SOURCES+=selects.cc
 
 
-dnchan_la_LDFLAGS = -module  -no-undefined -avoid-version ${AM_LDFLAGS} ${AM_CFLAGS}
+dionaeaHarvester_la_LDFLAGS = -module  -no-undefined -avoid-version ${AM_LDFLAGS} ${AM_CFLAGS}
 
-dnchan_la_CPPFLAGS = ${AM_CFLAGS}
+dionaeaHarvester_la_CPPFLAGS = ${AM_CFLAGS}
 

File modules/channel/dionaeaHarvester/Makefile.in

   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(pkglibdir)"
 LTLIBRARIES = $(pkglib_LTLIBRARIES)
-dnchan_la_LIBADD =
-am_dnchan_la_OBJECTS = dnchan_la-dionaeaHarvester.lo \
-	dnchan_la-interface.lo dnchan_la-python-interface.lo \
-	dnchan_la-quechua.lo dnchan_la-selects.lo
-dnchan_la_OBJECTS = $(am_dnchan_la_OBJECTS)
-dnchan_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+dionaeaHarvester_la_LIBADD =
+am_dionaeaHarvester_la_OBJECTS =  \
+	dionaeaHarvester_la-dionaeaHarvester.lo \
+	dionaeaHarvester_la-interface.lo \
+	dionaeaHarvester_la-python-interface.lo \
+	dionaeaHarvester_la-quechua.lo dionaeaHarvester_la-selects.lo
+dionaeaHarvester_la_OBJECTS = $(am_dionaeaHarvester_la_OBJECTS)
+dionaeaHarvester_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
-	$(CXXFLAGS) $(dnchan_la_LDFLAGS) $(LDFLAGS) -o $@
+	$(CXXFLAGS) $(dionaeaHarvester_la_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-SOURCES = $(dnchan_la_SOURCES)
-DIST_SOURCES = $(dnchan_la_SOURCES)
+SOURCES = $(dionaeaHarvester_la_SOURCES)
+DIST_SOURCES = $(dionaeaHarvester_la_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 	--cflags glibmm-2.4` -fno-strict-aliasing -fPIC -std=c++0x
 AM_LDFLAGS = `pkg-config --libs glibmm-2.4` `pkg-config --libs \
 	libpqxx`
-pkglib_LTLIBRARIES = dnchan.la
+pkglib_LTLIBRARIES = dionaeaHarvester.la
 
-#dnchan_la_SOURCES = dionaeaHarvester.cc ../../../src/interface.cc ../../../src/python-interface.cc ../../../src/quechua.cc selects.cc
-dnchan_la_SOURCES = dionaeaHarvester.cc ../../../src/interface.cc \
-	../../../src/python-interface.cc ../../../src/quechua.cc \
-	selects.cc
-dnchan_la_LDFLAGS = -module  -no-undefined -avoid-version ${AM_LDFLAGS} ${AM_CFLAGS}
-dnchan_la_CPPFLAGS = ${AM_CFLAGS}
+#dionaeaHarvester_la_SOURCES = dionaeaHarvester.cc ../../../src/interface.cc ../../../src/python-interface.cc ../../../src/quechua.cc selects.cc
+dionaeaHarvester_la_SOURCES = dionaeaHarvester.cc \
+	../../../src/interface.cc ../../../src/python-interface.cc \
+	../../../src/quechua.cc selects.cc
+dionaeaHarvester_la_LDFLAGS = -module  -no-undefined -avoid-version ${AM_LDFLAGS} ${AM_CFLAGS}
+dionaeaHarvester_la_CPPFLAGS = ${AM_CFLAGS}
 all: all-am
 
 .SUFFIXES:
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
-dnchan.la: $(dnchan_la_OBJECTS) $(dnchan_la_DEPENDENCIES) 
-	$(dnchan_la_LINK) -rpath $(pkglibdir) $(dnchan_la_OBJECTS) $(dnchan_la_LIBADD) $(LIBS)
+dionaeaHarvester.la: $(dionaeaHarvester_la_OBJECTS) $(dionaeaHarvester_la_DEPENDENCIES) 
+	$(dionaeaHarvester_la_LINK) -rpath $(pkglibdir) $(dionaeaHarvester_la_OBJECTS) $(dionaeaHarvester_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnchan_la-dionaeaHarvester.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnchan_la-interface.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnchan_la-python-interface.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnchan_la-quechua.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnchan_la-selects.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dionaeaHarvester_la-dionaeaHarvester.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dionaeaHarvester_la-interface.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dionaeaHarvester_la-python-interface.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dionaeaHarvester_la-quechua.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dionaeaHarvester_la-selects.Plo@am__quote@
 
 .cc.o:
 @am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
 
-dnchan_la-dionaeaHarvester.lo: dionaeaHarvester.cc
-@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dnchan_la-dionaeaHarvester.lo -MD -MP -MF $(DEPDIR)/dnchan_la-dionaeaHarvester.Tpo -c -o dnchan_la-dionaeaHarvester.lo `test -f 'dionaeaHarvester.cc' || echo '$(srcdir)/'`dionaeaHarvester.cc
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dnchan_la-dionaeaHarvester.Tpo $(DEPDIR)/dnchan_la-dionaeaHarvester.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='dionaeaHarvester.cc' object='dnchan_la-dionaeaHarvester.lo' libtool=yes @AMDEPBACKSLASH@
+dionaeaHarvester_la-dionaeaHarvester.lo: dionaeaHarvester.cc
+@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dionaeaHarvester_la-dionaeaHarvester.lo -MD -MP -MF $(DEPDIR)/dionaeaHarvester_la-dionaeaHarvester.Tpo -c -o dionaeaHarvester_la-dionaeaHarvester.lo `test -f 'dionaeaHarvester.cc' || echo '$(srcdir)/'`dionaeaHarvester.cc
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dionaeaHarvester_la-dionaeaHarvester.Tpo $(DEPDIR)/dionaeaHarvester_la-dionaeaHarvester.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='dionaeaHarvester.cc' object='dionaeaHarvester_la-dionaeaHarvester.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dnchan_la-dionaeaHarvester.lo `test -f 'dionaeaHarvester.cc' || echo '$(srcdir)/'`dionaeaHarvester.cc
+@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dionaeaHarvester_la-dionaeaHarvester.lo `test -f 'dionaeaHarvester.cc' || echo '$(srcdir)/'`dionaeaHarvester.cc
 
-dnchan_la-interface.lo: ../../../src/interface.cc
-@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dnchan_la-interface.lo -MD -MP -MF $(DEPDIR)/dnchan_la-interface.Tpo -c -o dnchan_la-interface.lo `test -f '../../../src/interface.cc' || echo '$(srcdir)/'`../../../src/interface.cc
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dnchan_la-interface.Tpo $(DEPDIR)/dnchan_la-interface.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../../../src/interface.cc' object='dnchan_la-interface.lo' libtool=yes @AMDEPBACKSLASH@
+dionaeaHarvester_la-interface.lo: ../../../src/interface.cc
+@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dionaeaHarvester_la-interface.lo -MD -MP -MF $(DEPDIR)/dionaeaHarvester_la-interface.Tpo -c -o dionaeaHarvester_la-interface.lo `test -f '../../../src/interface.cc' || echo '$(srcdir)/'`../../../src/interface.cc
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dionaeaHarvester_la-interface.Tpo $(DEPDIR)/dionaeaHarvester_la-interface.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../../../src/interface.cc' object='dionaeaHarvester_la-interface.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dnchan_la-interface.lo `test -f '../../../src/interface.cc' || echo '$(srcdir)/'`../../../src/interface.cc
+@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dionaeaHarvester_la-interface.lo `test -f '../../../src/interface.cc' || echo '$(srcdir)/'`../../../src/interface.cc
 
-dnchan_la-python-interface.lo: ../../../src/python-interface.cc
-@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dnchan_la-python-interface.lo -MD -MP -MF $(DEPDIR)/dnchan_la-python-interface.Tpo -c -o dnchan_la-python-interface.lo `test -f '../../../src/python-interface.cc' || echo '$(srcdir)/'`../../../src/python-interface.cc
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dnchan_la-python-interface.Tpo $(DEPDIR)/dnchan_la-python-interface.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../../../src/python-interface.cc' object='dnchan_la-python-interface.lo' libtool=yes @AMDEPBACKSLASH@
+dionaeaHarvester_la-python-interface.lo: ../../../src/python-interface.cc
+@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dionaeaHarvester_la-python-interface.lo -MD -MP -MF $(DEPDIR)/dionaeaHarvester_la-python-interface.Tpo -c -o dionaeaHarvester_la-python-interface.lo `test -f '../../../src/python-interface.cc' || echo '$(srcdir)/'`../../../src/python-interface.cc
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dionaeaHarvester_la-python-interface.Tpo $(DEPDIR)/dionaeaHarvester_la-python-interface.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../../../src/python-interface.cc' object='dionaeaHarvester_la-python-interface.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dnchan_la-python-interface.lo `test -f '../../../src/python-interface.cc' || echo '$(srcdir)/'`../../../src/python-interface.cc
+@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dionaeaHarvester_la-python-interface.lo `test -f '../../../src/python-interface.cc' || echo '$(srcdir)/'`../../../src/python-interface.cc
 
-dnchan_la-quechua.lo: ../../../src/quechua.cc
-@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dnchan_la-quechua.lo -MD -MP -MF $(DEPDIR)/dnchan_la-quechua.Tpo -c -o dnchan_la-quechua.lo `test -f '../../../src/quechua.cc' || echo '$(srcdir)/'`../../../src/quechua.cc
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dnchan_la-quechua.Tpo $(DEPDIR)/dnchan_la-quechua.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../../../src/quechua.cc' object='dnchan_la-quechua.lo' libtool=yes @AMDEPBACKSLASH@
+dionaeaHarvester_la-quechua.lo: ../../../src/quechua.cc
+@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dionaeaHarvester_la-quechua.lo -MD -MP -MF $(DEPDIR)/dionaeaHarvester_la-quechua.Tpo -c -o dionaeaHarvester_la-quechua.lo `test -f '../../../src/quechua.cc' || echo '$(srcdir)/'`../../../src/quechua.cc
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dionaeaHarvester_la-quechua.Tpo $(DEPDIR)/dionaeaHarvester_la-quechua.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../../../src/quechua.cc' object='dionaeaHarvester_la-quechua.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dnchan_la-quechua.lo `test -f '../../../src/quechua.cc' || echo '$(srcdir)/'`../../../src/quechua.cc
+@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dionaeaHarvester_la-quechua.lo `test -f '../../../src/quechua.cc' || echo '$(srcdir)/'`../../../src/quechua.cc
 
-dnchan_la-selects.lo: selects.cc
-@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dnchan_la-selects.lo -MD -MP -MF $(DEPDIR)/dnchan_la-selects.Tpo -c -o dnchan_la-selects.lo `test -f 'selects.cc' || echo '$(srcdir)/'`selects.cc
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dnchan_la-selects.Tpo $(DEPDIR)/dnchan_la-selects.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='selects.cc' object='dnchan_la-selects.lo' libtool=yes @AMDEPBACKSLASH@
+dionaeaHarvester_la-selects.lo: selects.cc
+@am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT dionaeaHarvester_la-selects.lo -MD -MP -MF $(DEPDIR)/dionaeaHarvester_la-selects.Tpo -c -o dionaeaHarvester_la-selects.lo `test -f 'selects.cc' || echo '$(srcdir)/'`selects.cc
+@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/dionaeaHarvester_la-selects.Tpo $(DEPDIR)/dionaeaHarvester_la-selects.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='selects.cc' object='dionaeaHarvester_la-selects.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dnchan_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dnchan_la-selects.lo `test -f 'selects.cc' || echo '$(srcdir)/'`selects.cc
+@am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dionaeaHarvester_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o dionaeaHarvester_la-selects.lo `test -f 'selects.cc' || echo '$(srcdir)/'`selects.cc
 
 mostlyclean-libtool:
 	-rm -f *.lo

File modules/channel/dionaeaHarvester/dionaeaHarvester.cc

 
 bool exec_query(dbwork_t& w,dbresult_t& r, const char* q, bool commit) {
     
+
+    LOG(DEBUG) << "Trying to execute SQL query: " << q;
     try {
         r = w.exec(q);
         if(commit)
         LOG(ERROR) << "DionaeaHarvester, check your database and/or connection";
         return false;
     } catch (undefined_column_ex& ex) {
-        LOG(ERROR) << "Missing column? Check your SQL query and/or database, something is wrong\n"
+        LOG(ERROR) << "Missing column? Check your SQL query and/or database\n"
                    << "Query executed: " << q;
         return false;
         
         return false;
 
     } catch(undef_table_ex& ex) {
-        LOG(ERROR) << "Trying to read from non existed table while executing SQL: " 
+        LOG(ERROR) << "Trying to read from non existing table while executing SQL: " 
                    << q;
         return false;
     } catch(sql_ex& ex) {
 }
 
 DionaeaHarvester::DionaeaHarvester(): Channel(), connection(NULL) {
+    memset(formated_query,0,QUERY_LIMIT);
 };
 DionaeaHarvester::~DionaeaHarvester() {
     stop();
         misc.lookupValue("password",credentials.password);
         misc.lookupValue("hostname",credentials.hostname);
         misc.lookupValue("database",credentials.database);
+        
 
     } catch(setting_ex& ex) {
         LOG(WARN) << "One of the required settings was not found. "
                   << "You must specify: "
-                  << "-user\n-pass\n-hostname\n-database name\n-interval";
+                  << "-user\n-pass\n-hostname\n-database name\n";
         return false;
     }
-   
-    Python::calculate_date_ranges(raw_interval,range.from,range.to);
-    LOG(DEBUG) << "Calculated from: " << range.from << " to: " << range.to;
+    
+    prepare_select_query(misc);
     return true;
 }
 
         LOG(ERROR) << "DionaeaHarvester: Cannot allocate memory for connection object";
         return false;
     } catch(connection_ex& ex) {
-        LOG(ERROR) << "DionaeaHarvester, check your database and/or connection";
+        LOG(ERROR) << "DionaeaHarvester, check your database and/or connection " << ex.what() ;
         delete connection;
         connection = NULL;
         return false;
 };
 
 void DionaeaHarvester::fetch_data() {
-    static char buf[1024];
-#ifdef SELECT_V1
-    sprintf(buf,ChannelSelects::fetch_connections);
-#else
-    snprintf(buf,1023,ChannelSelects::fetch_connections,range.from.c_str(),range.to.c_str());
-#endif
-    buf[1023] = '\0';
+
+    update_select_query();
     DionaeaConnections *connections = NULL;
     try {
         dbwork_t work(*connection);
         dbresult_t result;
 
-        if(!exec_query(work,result,buf,true)) {
+        if(!exec_query(work,result,formated_query,true)) {
             LOG(WARN) << "DionaeaHarvester query execution failed, discarding data";
             return;
         }
 
     } catch(alloc_ex& ex) {
         LOG(CRITIC) << "Cannot allocate memory, discarding data";
-        if(connections) delete connections;
     } catch(connection_ex& ex) {
         LOG(ERROR) << "DionaeaHarvester, check your database and/or connection";
     } catch(std::exception& ex) {
     }
 };
 
+void DionaeaHarvester::update_select_query() {
+    if(fetch==INTERVAL) {
+        Python::calculate_ranges_from_interval(range.interval,range.from, range.to);
+    }
+    
+    if(fetch==ALL)
+        snprintf(formated_query,QUERY_LIMIT,select_query);
+    else
+        snprintf(formated_query,QUERY_LIMIT,select_query,range.from.c_str(),range.to.c_str());
+
+};
+
+void DionaeaHarvester::prepare_select_query(const setting_t& misc) {
+     if(misc.exists("interval")) {
+        setup_select_query_interval(misc);
+    } else if(misc.exists("from") && misc.exists("to")  && from_to_zeroed(misc)) {
+        LOG(DEBUG) << "from to zeroed";
+        setup_select_query_all();
+    } else if(misc.exists("from") && misc.exists("to")  && !from_to_zeroed(misc)) {
+        LOG(DEBUG) << "from to not zeroed";
+        setup_select_query_range(misc);
+    } else {
+        setup_default_query();
+    }
+};
+
+
+void DionaeaHarvester::setup_select_query_interval(const setting_t& misc) {
+   select_query = ChannelSelects::fetch_interval_connections;
+   fetch = INTERVAL;
+   misc.lookupValue("interval",range.interval);
+};
+
+void DionaeaHarvester::setup_select_query_range(const setting_t& misc) {
+   select_query = ChannelSelects::fetch_from_to_connections;
+   LOG(DEBUG) << "setup_select_query_range";
+   fetch = RANGE;
+   string_t from,to;
+   misc.lookupValue("from",from);
+   misc.lookupValue("to",to);
+   Python::sqlize_date_string(from,range.from);
+   Python::sqlize_date_string(to,range.to);
+};
+
+void DionaeaHarvester::setup_select_query_all() {
+   select_query = ChannelSelects::fetch_all_connections;
+   fetch = ALL;
+   range.from="null";
+   range.to  ="null";
+};
+
+void DionaeaHarvester::setup_default_query() {
+   setup_select_query_all(); // just for now
+};
+
+bool DionaeaHarvester::from_to_zeroed(const setting_t& misc) {
+    string_t from,to;
+    misc.lookupValue("from",from);
+    misc.lookupValue("to",to);
+    return (!from.compare("0") && !to.compare("0"));
+};
+
 inline bool DionaeaHarvester::check_connection(const dbconnection_t* c) {
     return c && c->is_open();
 };

File modules/channel/dionaeaHarvester/dionaeaHarvester.h

 bool exec_query(dbwork_t& w,dbresult_t& r, const char* q,bool commit = false);
 
 
-class DionaeaHarvester : public Channel {
+class  DionaeaHarvester : public Channel {
     
     struct credentials_s {
         string_t user;
         string_t database;
     };
     
-    struct range_s {
+    struct times_s {
+        string_t interval;
         string_t from;
         string_t to;
     };
 
+    enum FETCH {DEFAULT,ALL,RANGE,INTERVAL};
+
  public:
         DionaeaHarvester();
         virtual ~DionaeaHarvester();
 
  private:
         int interval;
-        range_s range;
+        times_s range;
+        const char* select_query;
+        FETCH fetch;
+
+        static const int QUERY_LIMIT = 2048;
+        char formated_query[QUERY_LIMIT];
 
         credentials_s credentials;
         dbconnection_t* connection;
 
         void fetch_data();
+
+        void update_select_query();
+
+        void prepare_select_query(const setting_t& misc);
+        void setup_select_query_interval(const setting_t& misc);
+        void setup_select_query_range(const setting_t& misc);
+        void setup_select_query_all();
+        void setup_default_query();
+        bool from_to_zeroed(const setting_t& misc);
 };
 
 extern "C" Channel* create_channel();

File modules/channel/dionaeaHarvester/selects.cc

 
 #include "selects.h"
 
-const char* ChannelSelects::fetch_connections = "SELECT connection, connection_timestamp,"
-                                                 "connection_transport, local_host,local_port, "
-                                                 "remote_host, remote_port "
-                                                 "FROM dionaea.connections "
-                                                 "WHERE connection_timestamp BETWEEN "
-//                                                 "%s AND %s ORDER BY connection ; ";
-                                                 "CURRENT_TIMESTAMP - interval '10 years '  AND CURRENT_TIMESTAMP ORDER BY connection LIMIT 10000; ";
-;
+const char* ChannelSelects::fetch_from_to_connections =  "SELECT connection, connection_timestamp,"
+                                                         "connection_transport, local_host,local_port, "
+                                                         "remote_host, remote_port "
+                                                         "FROM dionaea.connections "
+                                                         "WHERE connection_timestamp BETWEEN "
+                                                         "%s AND %s ORDER BY connection ;" ;
+
+const char* ChannelSelects::fetch_all_connections =      "SELECT connection, connection_timestamp, "
+                                                         "connection_transport, local_host,local_port, "
+                                                         "remote_host, remote_port "
+                                                         "FROM dionaea.connections "
+                                                         "ORDER by connection; " ;
+
+const char* ChannelSelects::fetch_interval_connections = "SELECT connection, connection_timestamp,"     
+                                                         "connection_transport, local_host,local_port, "
+                                                         "remote_host, remote_port "                    
+                                                         "FROM dionaea.connections "                    
+                                                         "WHERE connection_timestamp BETWEEN "          
+                                                         "%s AND %s "  
+                                                         "ORDER BY connection; "; 

File modules/channel/dionaeaHarvester/selects.h

  */
 
 struct  ChannelSelects {
-    static const char* fetch_connections;
+    static const char* fetch_all_connections;
+    static const char* fetch_from_to_connections;
+    static const char* fetch_interval_connections;
 };

File modules/channel/stdch/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/logger/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/logger/dionaealogger/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/logger/dionaealogger/dionaealogger.cc

 }
 
 index_t DionaeaLogger::get_oid(dbwork_t* w) {
-    static const char* sel_oid="SELECT nextval('miner.operation_id_seq');";
+    static const char* sel_oid="SELECT nextval('miner.operations_id_seq');";
     dbresult_t result;
 
     if(!exec_query(*w,result,sel_oid,false) || result.empty() ) {
 }
 
 bool DionaeaLogger::insert_into_operation(dbwork_t* w, index_t& oid, const string_t& from, const string_t& to) {
-   static const char* insert_op = "INSERT INTO miner.operation (id,start_time,end_time) VALUES (%lu, %s, %s);";
+   static const char* insert_op = "INSERT INTO miner.operations (id,start_time,end_time) VALUES (%lu, %s, %s);";
    memset(buf,0,1024);
    snprintf(buf,1024,insert_op,oid,from.c_str(),to.c_str());
    dbresult_t r; // we need faked object for exec_query() - how about making it static ?

File modules/processor/IpProcessor/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/processor/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File modules/processor/reverter/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File scripts/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@

File scripts/time_converter.py

 #!/usr/bin/env python
 
+import time
+
 from datetime import datetime
 from datetime import timedelta
 
-TIME_SUFFIXES = ['s','m','h','D']
+TIME_SUFFIXES = ('s','m','h','D')
 def convert_to_seconds(input_date):
     """
     This function tries to convert date custom format into seconds
         result_log =  "Bad input format, defaults to 1 hour (3600 seconds)"
         return (3600,result_log)
 
-def calculate_time_ranges(input_date):
+def calculate_ranges_from_interval(input_date):
     """
     The functions calculates (from,to) date ranges
     """
-    DATE_FORMAT ="YYYY-MM-DD HH24:MI:SS"
+    SQL_FORMAT ="YYYY-MM-DD HH24:MI:SS"
 
     if not input_date:
-        return (3600,"Empty input,defaults to 3600 seconds")  # dupa tama
+        return (3600,"Empty input,defaults to 3600 seconds") 
 
     date = datetime.today()
     input_date = input_date.strip()
 #        to_date = datetime(year=date.year,month=1,day=1)
 #        from_date = to_date - timedelta(days=interval*DAYS_IN_Y)
 
-    to_str   = "to_date('%s','%s')" % ( to_date.strftime("%Y-%m-%d %H:%M:%S"), DATE_FORMAT)
-    from_str = "to_date('%s','%s')" % ( from_date.strftime("%Y-%m-%d %H:%M:%S"), DATE_FORMAT)
+    to_str   = "to_date('%s','%s')" % ( to_date.strftime("%Y-%m-%d %H:%M:%S"), SQL_FORMAT)
+    from_str = "to_date('%s','%s')" % ( from_date.strftime("%Y-%m-%d %H:%M:%S"), SQL_FORMAT)
 
     return (from_str, to_str)
 
+def validate_dateformat(inp,date_format='%Y-%m-%d %H:%M:%S'):
+    """
+    Validates whether input is in provided format.
+    Returns a tuple with boolean value and log (empty if successful)
+    """
+    try:
+        stime = time.strptime(inp, date_format)
+    except ValueError,e:
+        return (False,str(e))
+    return (True,'')
+
+
+def sqlize_date_string(inp):
+    """
+    Formats string so it can be used directly as a date in PostgreSQL (or maybe more databases)
+    databases.
+    """
+    DATE_FORMAT='%Y-%m-%d %H:%M:%S'
+    SQL_FORMAT ="YYYY-MM-DD HH24:MI:SS"
+    try:
+        stime = time.strptime(inp,DATE_FORMAT)
+    except ValueError,e:
+        print str(e)
+        return 'CURRENT_TIMESTAMP'
+
+    datetime_obj = datetime.fromtimestamp(time.mktime(stime))
+    formated_date = "to_date('%s','%s')" % (datetime_obj.strftime(DATE_FORMAT), SQL_FORMAT )
+    return formated_date
+
+
 #print convert_to_seconds("")
 #f,t= calculate_time_ranges("2D")
 #print f,t

File src/Makefile.in

 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
     * are not yet ready.
     */
 
-    {LOG(INFO) << "Preparing components...\n";}
+    LOG(INFO) << "Preparing components...\n";
     
     g_quechua->prepare_loggers();
     g_quechua->prepare_channels();
     * In most cases this just launches ev_watchers (calls start() method)
     */
 
-    {LOG(INFO) << "Starting components...\n";}
+    LOG(INFO) << "Starting components...\n";
 
     g_quechua->start_loggers();
     g_quechua->start_channels();
 
     // destroy dynamic objects
     
-    {LOG(INFO) << "Destroying components...\n";}
+    LOG(INFO) << "Destroying components...\n";
     g_quechua->destroy_channels();
     g_quechua->destroy_loggers();
     g_quechua->destroy_workflows();

File src/python-interface.cc

             LOG(ERROR) << "PyList_Append";
             return;
         }
-// TODO(marek): causes segfault, no idea why. possible memleak
+// TODO(marek): causes segmentation fault, no idea why. possible memleak
 //        Py_XDECREF(pSys_path); 
         Py_XDECREF(pPath);
     }
 
     init();
 
-    int seconds = 3600;
+    int seconds = 3600*24; // 1D
     string_t log;
 
     PyObject *pName, *pModule, *pArgs, *pFunc, *pValue;
 
             }
             else {
-                LOG(WARN) << "Python script returned null value, setting default value (1H)";
+                LOG(WARN) << "Python script returned null value, setting default value (1D)";
                 PyErr_Print();
             }
         
     return seconds;
 };
 
-void Python::calculate_date_ranges(const string_t& time,string_t& from, string_t& to) {
+void Python::calculate_ranges_from_interval(const string_t& time,string_t& from, string_t& to) {
 
     init();
     PyObject *pName, *pModule, *pArgs, *pFunc, *pValue;
     pModule = PyImport_Import(pName);
     Py_DECREF(pName);
     if(pModule!=NULL) { 
-        pFunc = PyObject_GetAttrString(pModule, "calculate_time_ranges");
+        pFunc = PyObject_GetAttrString(pModule, "calculate_ranges_from_interval");
         if(pFunc && PyCallable_Check(pFunc)) {
             pArgs = PyTuple_New(1);
             pValue = PyString_FromString(time.c_str());
         PyErr_Print();
 
 };
+/**
+ * Input is read from the channel section in the configuration.
+ * 
+ **/ 
+void Python::format_dates_from_input(const string_t& input_from, const string_t& input_to,
+                                     string_t& output_from, string_t& output_to) {
+
+    init();
+    PyObject *pName, *pModule, *pArgs, *pFunc, *pValue;
+    PyObject *pItem, *pLog;
+
+    pName = PyString_FromString("time_converter");
+    
+    pModule = PyImport_Import(pName);
+    Py_DECREF(pName);
+    if(pModule!=NULL) { 
+        pFunc = PyObject_GetAttrString(pModule, "format_dates_from_input");
+        if(pFunc && PyCallable_Check(pFunc)) {
+            pArgs = PyTuple_New(2);
+            pValue = PyString_FromString(input_from.c_str());
+            PyTuple_SetItem(pArgs,0,pValue);
+
+            pValue = PyString_FromString(input_to.c_str());
+            PyTuple_SetItem(pArgs,1,pValue);
+
+            pValue = PyObject_CallObject(pFunc,pArgs);
+            if(pValue!=NULL) {
+
+                pItem = PyTuple_GetItem(pValue,0);
+                output_from = PyString_AsString(pItem);
+
+                Py_XDECREF(pItem);
+                
+                pItem = PyTuple_GetItem(pValue,1);
+                output_to   = PyString_AsString(pItem);
+
+                Py_XDECREF(pValue);
+                Py_XDECREF(pItem);
+
+            }
+            else {
+                LOG(WARN) << "Python script returned null value, setting default value (1H)";
+                PyErr_Print();
+            }
+        
+            Py_XDECREF(pFunc);
+            Py_XDECREF(pArgs);
+        }
+        Py_XDECREF(pModule);
+    }
+    else 
+        PyErr_Print();
+
+};
+
+void Python::sqlize_date_string(const string_t& input_date, string_t& sqlized_date) {
+    init();
+    sqlized_date = "CURRENT_TIMESTAMP";
+    PyObject *pName, *pModule, *pArgs, *pFunc, *pValue;
+    PyObject *pItem, *pLog;
+
+    pName = PyString_FromString("time_converter");
+    
+    pModule = PyImport_Import(pName);
+    Py_DECREF(pName);
+    if(pModule!=NULL) {
+        pFunc = PyObject_GetAttrString(pModule,"sqlize_date_string");
+        if(pFunc && PyCallable_Check(pFunc)) {
+            pArgs = PyTuple_New(1);
+            pValue = PyString_FromString(input_date.c_str());
+            PyTuple_SetItem(pArgs,0,pValue);
+
+            pValue = PyObject_CallObject(pFunc,pArgs);
+            if(pValue!=NULL) {
+                sqlized_date = PyString_AsString(pValue);
+                Py_XDECREF(pValue);
+
+            }
+            else {
+                LOG(WARN) << "Python script returned null value, setting default value CURRENT_TIMESTAMP";
+                PyErr_Print();
+            }
+        
+            Py_XDECREF(pFunc);
+            Py_XDECREF(pArgs);
+        }
+        Py_XDECREF(pModule);
+    }
+    else {
+        PyErr_Print();
+        LOG(WARN) << "Cannot load Python module time_converter."; 
+    }
+};
+