summaryrefslogtreecommitdiffabout
path: root/src/Makefile.am
authorSergey Poznyakoff <gray@gnu.org.ua>2013-10-12 09:19:32 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-10-12 09:28:12 (GMT)
commitb6678bb65fce1f64e82cc049aae3d7ba6f8aa19c (patch) (side-by-side diff)
tree55c1959713e8f37f5958afb4c0cdb4d751406fe6 /src/Makefile.am
parent791cdf412f5fb66a056aa28b27507fdc9af86507 (diff)
downloadvmod-binlog-b6678bb65fce1f64e82cc049aae3d7ba6f8aa19c.tar.gz
vmod-binlog-b6678bb65fce1f64e82cc049aae3d7ba6f8aa19c.tar.bz2
Rewrite using opaque record data.
Records can carry arbitrary data, whose format is defined using teplate strings similar to those of Perl's pack() function. The teplate string is stored in the logfile header and is used by binlogcat to render a human-readable representation. * src/.gitignore: New file. * pack.c: New file. * pack.h: New file. * src/Makefile.am: Add pack.c, pack.h * src/binlog.c: Rewrite. Use pack routines to construct each record. * src/binlogcat.c: Likewise. Use packout to unpack each record. * src/vmod-binlog.h (struct binlog_record): Remove nid,aid. (struct binlog_file_header): Add hdrsize. (BINLOG_HEADER_SIZE,union binlog_header): Remove (binlog_recnum): Remove. (binlog_size): Rewrite. * src/vmod.vcc (append,sappend): Remove. (init): Change signature. (start,commit,pack): New functions. * tests/test01.at: Rewrite. * tests/test02.at: Rewrite.
Diffstat (limited to 'src/Makefile.am') (more/less context) (ignore whitespace changes)
-rw-r--r--src/Makefile.am6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c9daf9a..9ce519f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,7 +17,8 @@
AM_CPPFLAGS = -I$(VARNISHSRC)/include -I$(VARNISHSRC)
bin_PROGRAMS = binlogcat
-binlogcat_SOURCES = binlogcat.c
+binlogcat_SOURCES = binlogcat.c pack.c
+binlogcat_CFLAGS = $(AM_CFLAGS)
vmoddir = $(VMODDIR)
vmod_LTLIBRARIES = libvmod_binlog.la
@@ -27,9 +28,12 @@ libvmod_binlog_la_LIBADD=
libvmod_binlog_la_SOURCES = \
binlog.c\
+ pack.c\
vmod-binlog.h\
vcc_if.c vcc_if.h
+noinst_HEADERS = pack.h
+
BUILT_SOURCES = vcc_if.c vcc_if.h
vcc_if.c vcc_if.h: $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod.vcc

Return to:

Send suggestions and report system problems to the System administrator.