From 8f01c9a51e32891b862489e4082d2c20aa1fc883 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 9 Jun 2015 00:21:45 +0200 Subject: Improve sender and sender_client 1) Add sockguard in sockutils.hh to help with closing sockets 2) Make sender fork in background 3) Make sender_client start a sender if needed (and sender_bin specified in config) --- src/Makefile.am | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 06647f5..c85aca3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,16 +4,19 @@ AM_CPPFLAGS = @DEFINES@ -DLOCALSTATEDIR='"@localstatedir@/stuff"' \ -DSYSCONFDIR='"@sysconfdir@/stuff"' bin_PROGRAMS = event sender -noinst_LTLIBRARIES = libdb.la libcgi.la libutil.la +noinst_PROGRAMS = test-sender +noinst_LTLIBRARIES = libdb.la libcgi.la libutil.la libsender_client.la -event_SOURCES = event.cc event.hh event_main.cc common.hh cgi.hh db.hh \ - sender_client.cc sender_client.hh -event_LDADD = libdb.la libcgi.la +event_SOURCES = event.cc event.hh event_main.cc common.hh cgi.hh db.hh +event_LDADD = libdb.la libcgi.la libsender_client.la sender_SOURCES = common.hh sender.cc json.hh json.cc sender_CPPFLAGS = $(AM_CPPFLAGS) @CURL_CFLAGS@ sender_LDADD = libutil.la @CURL_LIBS@ +test_sender_SOURCES = common.hh test_sender.cc sender_client.hh +test_sender_LDADD = libsender_client.la + libcgi_la_SOURCES = cgi.hh common.hh cgi.cc \ query_parser.hh query_parser.cc \ header_parser.hh header_parser.cc \ @@ -30,3 +33,5 @@ libdb_la_LIBADD = @SQLITE3_LIBS@ libutil_la_SOURCES = common.hh fsutils.cc fsutils.hh config.cc config.hh \ strutils.hh strutils.cc sockutils.hh sockutils.cc +libsender_client_la_SOURCES = common.h sender_client.cc sender_client.hh +libsender_client_la_LIBADD = libutil.la -- cgit v1.2.3-70-g09d2