diff options
Diffstat (limited to 'src/medsrv')
-rw-r--r-- | src/medsrv/Makefile.am | 14 | ||||
-rw-r--r-- | src/medsrv/Makefile.in | 125 | ||||
-rw-r--r-- | src/medsrv/controller/peer_controller.c | 23 | ||||
-rw-r--r-- | src/medsrv/controller/peer_controller.h | 6 | ||||
-rw-r--r-- | src/medsrv/controller/user_controller.c | 26 | ||||
-rw-r--r-- | src/medsrv/controller/user_controller.h | 6 | ||||
-rw-r--r-- | src/medsrv/filter/auth_filter.c | 9 | ||||
-rw-r--r-- | src/medsrv/filter/auth_filter.h | 6 | ||||
-rw-r--r-- | src/medsrv/main.c | 17 | ||||
-rw-r--r-- | src/medsrv/user.c | 3 | ||||
-rw-r--r-- | src/medsrv/user.h | 4 |
11 files changed, 133 insertions, 106 deletions
diff --git a/src/medsrv/Makefile.am b/src/medsrv/Makefile.am index 43da9c4e5..40bafd856 100644 --- a/src/medsrv/Makefile.am +++ b/src/medsrv/Makefile.am @@ -10,11 +10,15 @@ controller/peer_controller.c controller/peer_controller.h medsrv_fcgi_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la $(top_builddir)/src/libfast/libfast.la main.o : $(top_builddir)/config.status -INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libfast -AM_CFLAGS = -rdynamic \ - -DIPSECDIR=\"${ipsecdir}\" \ - -DIPSEC_PIDDIR=\"${piddir}\" \ - -DPLUGINS=\""${medsrv_plugins}\"" +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/libstrongswan \ + -I$(top_srcdir)/src/libfast \ + -DIPSECDIR=\"${ipsecdir}\" \ + -DIPSEC_PIDDIR=\"${piddir}\" \ + -DPLUGINS=\""${medsrv_plugins}\"" + +AM_CFLAGS = \ + -rdynamic # Don't forget to add templates to EXTRA_DIST !!! How to automate? medsrv_templatesdir = ${medsrvdir}/templates diff --git a/src/medsrv/Makefile.in b/src/medsrv/Makefile.in index 27065e2f0..e9709d375 100644 --- a/src/medsrv/Makefile.in +++ b/src/medsrv/Makefile.in @@ -64,7 +64,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \ $(top_srcdir)/m4/macros/with.m4 \ $(top_srcdir)/m4/macros/enable-disable.m4 \ $(top_srcdir)/m4/macros/add-plugin.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -84,19 +84,35 @@ medsrv_fcgi_OBJECTS = $(am_medsrv_fcgi_OBJECTS) medsrv_fcgi_DEPENDENCIES = \ $(top_builddir)/src/libstrongswan/libstrongswan.la \ $(top_builddir)/src/libfast/libfast.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(medsrv_fcgi_SOURCES) DIST_SOURCES = $(medsrv_fcgi_SOURCES) am__can_run_installinfo = \ @@ -139,6 +155,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -151,6 +168,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ +COVERAGE_CFLAGS = @COVERAGE_CFLAGS@ +COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -166,6 +185,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GENHTML = @GENHTML@ GPERF = @GPERF@ GPRBUILD = @GPRBUILD@ GREP = @GREP@ @@ -174,6 +194,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ @@ -220,6 +241,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIB = @SOCKLIB@ STRIP = @STRIP@ +UNWINDLIB = @UNWINDLIB@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -248,6 +270,7 @@ charon_natt_port = @charon_natt_port@ charon_plugins = @charon_plugins@ charon_udp_port = @charon_udp_port@ clearsilver_LIBS = @clearsilver_LIBS@ +cmd_plugins = @cmd_plugins@ datadir = @datadir@ datarootdir = @datarootdir@ dbusservicedir = @dbusservicedir@ @@ -332,11 +355,15 @@ controller/user_controller.c controller/user_controller.h \ controller/peer_controller.c controller/peer_controller.h medsrv_fcgi_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la $(top_builddir)/src/libfast/libfast.la -INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libfast -AM_CFLAGS = -rdynamic \ - -DIPSECDIR=\"${ipsecdir}\" \ - -DIPSEC_PIDDIR=\"${piddir}\" \ - -DPLUGINS=\""${medsrv_plugins}\"" +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/libstrongswan \ + -I$(top_srcdir)/src/libfast \ + -DIPSECDIR=\"${ipsecdir}\" \ + -DIPSEC_PIDDIR=\"${piddir}\" \ + -DPLUGINS=\""${medsrv_plugins}\"" + +AM_CFLAGS = \ + -rdynamic # Don't forget to add templates to EXTRA_DIST !!! How to automate? @@ -444,7 +471,7 @@ clean-medsrvPROGRAMS: rm -f $$list medsrv.fcgi$(EXEEXT): $(medsrv_fcgi_OBJECTS) $(medsrv_fcgi_DEPENDENCIES) $(EXTRA_medsrv_fcgi_DEPENDENCIES) @rm -f medsrv.fcgi$(EXEEXT) - $(LINK) $(medsrv_fcgi_OBJECTS) $(medsrv_fcgi_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(medsrv_fcgi_OBJECTS) $(medsrv_fcgi_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -459,67 +486,67 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user_controller.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< auth_filter.o: filter/auth_filter.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT auth_filter.o -MD -MP -MF $(DEPDIR)/auth_filter.Tpo -c -o auth_filter.o `test -f 'filter/auth_filter.c' || echo '$(srcdir)/'`filter/auth_filter.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/auth_filter.Tpo $(DEPDIR)/auth_filter.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/auth_filter.c' object='auth_filter.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT auth_filter.o -MD -MP -MF $(DEPDIR)/auth_filter.Tpo -c -o auth_filter.o `test -f 'filter/auth_filter.c' || echo '$(srcdir)/'`filter/auth_filter.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/auth_filter.Tpo $(DEPDIR)/auth_filter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filter/auth_filter.c' object='auth_filter.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o auth_filter.o `test -f 'filter/auth_filter.c' || echo '$(srcdir)/'`filter/auth_filter.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o auth_filter.o `test -f 'filter/auth_filter.c' || echo '$(srcdir)/'`filter/auth_filter.c auth_filter.obj: filter/auth_filter.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT auth_filter.obj -MD -MP -MF $(DEPDIR)/auth_filter.Tpo -c -o auth_filter.obj `if test -f 'filter/auth_filter.c'; then $(CYGPATH_W) 'filter/auth_filter.c'; else $(CYGPATH_W) '$(srcdir)/filter/auth_filter.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/auth_filter.Tpo $(DEPDIR)/auth_filter.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/auth_filter.c' object='auth_filter.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT auth_filter.obj -MD -MP -MF $(DEPDIR)/auth_filter.Tpo -c -o auth_filter.obj `if test -f 'filter/auth_filter.c'; then $(CYGPATH_W) 'filter/auth_filter.c'; else $(CYGPATH_W) '$(srcdir)/filter/auth_filter.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/auth_filter.Tpo $(DEPDIR)/auth_filter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filter/auth_filter.c' object='auth_filter.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o auth_filter.obj `if test -f 'filter/auth_filter.c'; then $(CYGPATH_W) 'filter/auth_filter.c'; else $(CYGPATH_W) '$(srcdir)/filter/auth_filter.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o auth_filter.obj `if test -f 'filter/auth_filter.c'; then $(CYGPATH_W) 'filter/auth_filter.c'; else $(CYGPATH_W) '$(srcdir)/filter/auth_filter.c'; fi` user_controller.o: controller/user_controller.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT user_controller.o -MD -MP -MF $(DEPDIR)/user_controller.Tpo -c -o user_controller.o `test -f 'controller/user_controller.c' || echo '$(srcdir)/'`controller/user_controller.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/user_controller.Tpo $(DEPDIR)/user_controller.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='controller/user_controller.c' object='user_controller.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT user_controller.o -MD -MP -MF $(DEPDIR)/user_controller.Tpo -c -o user_controller.o `test -f 'controller/user_controller.c' || echo '$(srcdir)/'`controller/user_controller.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/user_controller.Tpo $(DEPDIR)/user_controller.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='controller/user_controller.c' object='user_controller.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o user_controller.o `test -f 'controller/user_controller.c' || echo '$(srcdir)/'`controller/user_controller.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o user_controller.o `test -f 'controller/user_controller.c' || echo '$(srcdir)/'`controller/user_controller.c user_controller.obj: controller/user_controller.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT user_controller.obj -MD -MP -MF $(DEPDIR)/user_controller.Tpo -c -o user_controller.obj `if test -f 'controller/user_controller.c'; then $(CYGPATH_W) 'controller/user_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/user_controller.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/user_controller.Tpo $(DEPDIR)/user_controller.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='controller/user_controller.c' object='user_controller.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT user_controller.obj -MD -MP -MF $(DEPDIR)/user_controller.Tpo -c -o user_controller.obj `if test -f 'controller/user_controller.c'; then $(CYGPATH_W) 'controller/user_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/user_controller.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/user_controller.Tpo $(DEPDIR)/user_controller.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='controller/user_controller.c' object='user_controller.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o user_controller.obj `if test -f 'controller/user_controller.c'; then $(CYGPATH_W) 'controller/user_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/user_controller.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o user_controller.obj `if test -f 'controller/user_controller.c'; then $(CYGPATH_W) 'controller/user_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/user_controller.c'; fi` peer_controller.o: controller/peer_controller.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT peer_controller.o -MD -MP -MF $(DEPDIR)/peer_controller.Tpo -c -o peer_controller.o `test -f 'controller/peer_controller.c' || echo '$(srcdir)/'`controller/peer_controller.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/peer_controller.Tpo $(DEPDIR)/peer_controller.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='controller/peer_controller.c' object='peer_controller.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT peer_controller.o -MD -MP -MF $(DEPDIR)/peer_controller.Tpo -c -o peer_controller.o `test -f 'controller/peer_controller.c' || echo '$(srcdir)/'`controller/peer_controller.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/peer_controller.Tpo $(DEPDIR)/peer_controller.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='controller/peer_controller.c' object='peer_controller.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o peer_controller.o `test -f 'controller/peer_controller.c' || echo '$(srcdir)/'`controller/peer_controller.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o peer_controller.o `test -f 'controller/peer_controller.c' || echo '$(srcdir)/'`controller/peer_controller.c peer_controller.obj: controller/peer_controller.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT peer_controller.obj -MD -MP -MF $(DEPDIR)/peer_controller.Tpo -c -o peer_controller.obj `if test -f 'controller/peer_controller.c'; then $(CYGPATH_W) 'controller/peer_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/peer_controller.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/peer_controller.Tpo $(DEPDIR)/peer_controller.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='controller/peer_controller.c' object='peer_controller.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT peer_controller.obj -MD -MP -MF $(DEPDIR)/peer_controller.Tpo -c -o peer_controller.obj `if test -f 'controller/peer_controller.c'; then $(CYGPATH_W) 'controller/peer_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/peer_controller.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/peer_controller.Tpo $(DEPDIR)/peer_controller.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='controller/peer_controller.c' object='peer_controller.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o peer_controller.obj `if test -f 'controller/peer_controller.c'; then $(CYGPATH_W) 'controller/peer_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/peer_controller.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o peer_controller.obj `if test -f 'controller/peer_controller.c'; then $(CYGPATH_W) 'controller/peer_controller.c'; else $(CYGPATH_W) '$(srcdir)/controller/peer_controller.c'; fi` mostlyclean-libtool: -rm -f *.lo diff --git a/src/medsrv/controller/peer_controller.c b/src/medsrv/controller/peer_controller.c index 7b0b9e6ac..4943647b5 100644 --- a/src/medsrv/controller/peer_controller.c +++ b/src/medsrv/controller/peer_controller.c @@ -52,7 +52,7 @@ struct private_peer_controller_t { /** * list the configured peer configs */ -static void list(private_peer_controller_t *this, request_t *request) +static void list(private_peer_controller_t *this, fast_request_t *request) { enumerator_t *query; @@ -83,7 +83,7 @@ static void list(private_peer_controller_t *this, request_t *request) /** * verify a peer alias */ -static bool verify_alias(private_peer_controller_t *this, request_t *request, +static bool verify_alias(private_peer_controller_t *this, fast_request_t *request, char *alias) { if (!alias || *alias == '\0') @@ -117,7 +117,7 @@ static bool verify_alias(private_peer_controller_t *this, request_t *request, * parse and verify a public key */ static bool parse_public_key(private_peer_controller_t *this, - request_t *request, char *public_key, + fast_request_t *request, char *public_key, chunk_t *encoding, chunk_t *keyid) { public_key_t *public; @@ -153,7 +153,7 @@ static bool parse_public_key(private_peer_controller_t *this, /** * register a new peer */ -static void add(private_peer_controller_t *this, request_t *request) +static void add(private_peer_controller_t *this, fast_request_t *request) { char *alias = "", *public_key = ""; @@ -231,7 +231,7 @@ char* pem_encode(chunk_t der) /** * edit a peer */ -static void edit(private_peer_controller_t *this, request_t *request, int id) +static void edit(private_peer_controller_t *this, fast_request_t *request, int id) { char *alias = "", *public_key = "", *pem; chunk_t encoding, keyid; @@ -305,21 +305,21 @@ static void edit(private_peer_controller_t *this, request_t *request, int id) /** * delete a peer from the database */ -static void delete(private_peer_controller_t *this, request_t *request, int id) +static void delete(private_peer_controller_t *this, fast_request_t *request, int id) { this->db->execute(this->db, NULL, "DELETE FROM peer WHERE id = ? AND user = ?", DB_INT, id, DB_UINT, this->user->get_user(this->user)); } -METHOD(controller_t, get_name, char*, +METHOD(fast_controller_t, get_name, char*, private_peer_controller_t *this) { return "peer"; } -METHOD(controller_t, handle, void, - private_peer_controller_t *this, request_t *request, char *action, +METHOD(fast_controller_t, handle, void, + private_peer_controller_t *this, fast_request_t *request, char *action, char *idstr, char *p3, char *p4, char *p5) { if (action) @@ -350,7 +350,7 @@ METHOD(controller_t, handle, void, request->redirect(request, "peer/list"); } -METHOD(controller_t, destroy, void, +METHOD(fast_controller_t, destroy, void, private_peer_controller_t *this) { free(this); @@ -359,7 +359,7 @@ METHOD(controller_t, destroy, void, /* * see header file */ -controller_t *peer_controller_create(user_t *user, database_t *db) +fast_controller_t *peer_controller_create(user_t *user, database_t *db) { private_peer_controller_t *this; @@ -377,4 +377,3 @@ controller_t *peer_controller_create(user_t *user, database_t *db) return &this->public.controller; } - diff --git a/src/medsrv/controller/peer_controller.h b/src/medsrv/controller/peer_controller.h index b5a5e0bb8..1282156b7 100644 --- a/src/medsrv/controller/peer_controller.h +++ b/src/medsrv/controller/peer_controller.h @@ -24,7 +24,7 @@ #include <user.h> -#include <controller.h> +#include <fast_controller.h> #include <database/database.h> typedef struct peer_controller_t peer_controller_t; @@ -37,12 +37,12 @@ struct peer_controller_t { /** * Implements controller_t interface. */ - controller_t controller; + fast_controller_t controller; }; /** * Create a peer_controller controller instance. */ -controller_t *peer_controller_create(user_t *user, database_t *db); +fast_controller_t *peer_controller_create(user_t *user, database_t *db); #endif /** PEER_CONTROLLER_H_ @}*/ diff --git a/src/medsrv/controller/user_controller.c b/src/medsrv/controller/user_controller.c index 35c9d90c8..36d04e12c 100644 --- a/src/medsrv/controller/user_controller.c +++ b/src/medsrv/controller/user_controller.c @@ -76,7 +76,7 @@ static chunk_t hash_password(char *login, char *password) /** * Login a user. */ -static void login(private_user_controller_t *this, request_t *request) +static void login(private_user_controller_t *this, fast_request_t *request) { if (request->get_query_data(request, "submit")) { @@ -115,7 +115,7 @@ static void login(private_user_controller_t *this, request_t *request) /** * Logout a user. */ -static void logout(private_user_controller_t *this, request_t *request) +static void logout(private_user_controller_t *this, fast_request_t *request) { request->redirect(request, "user/login"); request->close_session(request); @@ -124,8 +124,8 @@ static void logout(private_user_controller_t *this, request_t *request) /** * verify a user entered username for validity */ -static bool verify_login(private_user_controller_t *this, request_t *request, - char *login) +static bool verify_login(private_user_controller_t *this, + fast_request_t *request, char *login) { if (!login || *login == '\0') { @@ -156,7 +156,8 @@ static bool verify_login(private_user_controller_t *this, request_t *request, /** * verify a user entered password for validity */ -static bool verify_password(private_user_controller_t *this, request_t *request, +static bool verify_password(private_user_controller_t *this, + fast_request_t *request, char *password, char *confirm) { if (!password || *password == '\0') @@ -181,7 +182,7 @@ static bool verify_password(private_user_controller_t *this, request_t *request, /** * Register a user. */ -static void add(private_user_controller_t *this, request_t *request) +static void add(private_user_controller_t *this, fast_request_t *request) { char *login = ""; @@ -222,7 +223,7 @@ static void add(private_user_controller_t *this, request_t *request) /** * Edit the logged in user */ -static void edit(private_user_controller_t *this, request_t *request) +static void edit(private_user_controller_t *this, fast_request_t *request) { enumerator_t *query; char *old_login; @@ -297,14 +298,14 @@ static void edit(private_user_controller_t *this, request_t *request) request->render(request, "templates/user/edit.cs"); } -METHOD(controller_t, get_name, char*, +METHOD(fast_controller_t, get_name, char*, private_user_controller_t *this) { return "user"; } -METHOD(controller_t, handle, void, - private_user_controller_t *this, request_t *request, char *action, +METHOD(fast_controller_t, handle, void, + private_user_controller_t *this, fast_request_t *request, char *action, char *p2, char *p3, char *p4, char *p5) { if (action) @@ -333,7 +334,7 @@ METHOD(controller_t, handle, void, request->redirect(request, "user/login"); } -METHOD(controller_t, destroy, void, +METHOD(fast_controller_t, destroy, void, private_user_controller_t *this) { free(this); @@ -342,7 +343,7 @@ METHOD(controller_t, destroy, void, /* * see header file */ -controller_t *user_controller_create(user_t *user, database_t *db) +fast_controller_t *user_controller_create(user_t *user, database_t *db) { private_user_controller_t *this; @@ -362,4 +363,3 @@ controller_t *user_controller_create(user_t *user, database_t *db) return &this->public.controller; } - diff --git a/src/medsrv/controller/user_controller.h b/src/medsrv/controller/user_controller.h index 540dc74a2..8443a8d2b 100644 --- a/src/medsrv/controller/user_controller.h +++ b/src/medsrv/controller/user_controller.h @@ -24,7 +24,7 @@ #include <user.h> -#include <controller.h> +#include <fast_controller.h> #include <database/database.h> typedef struct user_controller_t user_controller_t; @@ -37,12 +37,12 @@ struct user_controller_t { /** * Implements controller_t interface. */ - controller_t controller; + fast_controller_t controller; }; /** * Create a user_controller controller instance. */ -controller_t *user_controller_create(user_t *user, database_t *db); +fast_controller_t *user_controller_create(user_t *user, database_t *db); #endif /** USER_CONTROLLER_H_ @}*/ diff --git a/src/medsrv/filter/auth_filter.c b/src/medsrv/filter/auth_filter.c index 436a72f2b..fb39bdb0e 100644 --- a/src/medsrv/filter/auth_filter.c +++ b/src/medsrv/filter/auth_filter.c @@ -40,8 +40,8 @@ struct private_auth_filter_t { database_t *db; }; -METHOD(filter_t, run, bool, - private_auth_filter_t *this, request_t *request, char *controller, +METHOD(fast_filter_t, run, bool, + private_auth_filter_t *this, fast_request_t *request, char *controller, char *action, char *p2, char *p3, char *p4, char *p5) { if (this->user->get_user(this->user)) @@ -70,7 +70,7 @@ METHOD(filter_t, run, bool, return FALSE; } -METHOD(filter_t, destroy, void, +METHOD(fast_filter_t, destroy, void, private_auth_filter_t *this) { free(this); @@ -79,7 +79,7 @@ METHOD(filter_t, destroy, void, /* * see header file */ -filter_t *auth_filter_create(user_t *user, database_t *db) +fast_filter_t *auth_filter_create(user_t *user, database_t *db) { private_auth_filter_t *this; @@ -96,4 +96,3 @@ filter_t *auth_filter_create(user_t *user, database_t *db) return &this->public.filter; } - diff --git a/src/medsrv/filter/auth_filter.h b/src/medsrv/filter/auth_filter.h index beae27965..022254dde 100644 --- a/src/medsrv/filter/auth_filter.h +++ b/src/medsrv/filter/auth_filter.h @@ -23,7 +23,7 @@ #define AUTH_FILTER_H_ #include <library.h> -#include <filter.h> +#include <fast_filter.h> #include "user.h" @@ -37,12 +37,12 @@ struct auth_filter_t { /** * Implements filter_t interface. */ - filter_t filter; + fast_filter_t filter; }; /** * Create a auth_filter instance. */ -filter_t *auth_filter_create(user_t *user, database_t *db); +fast_filter_t *auth_filter_create(user_t *user, database_t *db); #endif /** AUTH_FILTER_H_ @}*/ diff --git a/src/medsrv/main.c b/src/medsrv/main.c index 03b135289..6f08b97e5 100644 --- a/src/medsrv/main.c +++ b/src/medsrv/main.c @@ -16,7 +16,7 @@ #include <stdio.h> -#include <dispatcher.h> +#include <fast_dispatcher.h> #include <utils/debug.h> #include <database/database.h> @@ -26,7 +26,7 @@ int main(int arc, char *argv[]) { - dispatcher_t *dispatcher; + fast_dispatcher_t *dispatcher; database_t *db; char *socket; bool debug; @@ -34,7 +34,7 @@ int main(int arc, char *argv[]) int timeout, threads; library_init(NULL); - if (!lib->plugins->load(lib->plugins, NULL, + if (!lib->plugins->load(lib->plugins, lib->settings->get_str(lib->settings, "medsrv.load", PLUGINS))) { return 1; @@ -58,14 +58,14 @@ int main(int arc, char *argv[]) return 1; } - dispatcher = dispatcher_create(socket, debug, timeout, - (context_constructor_t)user_create, db); + dispatcher = fast_dispatcher_create(socket, debug, timeout, + (fast_context_constructor_t)user_create, db); dispatcher->add_filter(dispatcher, - (filter_constructor_t)auth_filter_create, db); + (fast_filter_constructor_t)auth_filter_create, db); dispatcher->add_controller(dispatcher, - (controller_constructor_t)user_controller_create, db); + (fast_controller_constructor_t)user_controller_create, db); dispatcher->add_controller(dispatcher, - (controller_constructor_t)peer_controller_create, db); + (fast_controller_constructor_t)peer_controller_create, db); dispatcher->run(dispatcher, threads); @@ -76,4 +76,3 @@ int main(int arc, char *argv[]) library_deinit(); return 0; } - diff --git a/src/medsrv/user.c b/src/medsrv/user.c index b4859080b..023dafbed 100644 --- a/src/medsrv/user.c +++ b/src/medsrv/user.c @@ -45,7 +45,7 @@ METHOD(user_t, get_user, u_int, return this->user; } -METHOD(context_t, destroy, void, +METHOD(fast_context_t, destroy, void, private_user_t *this) { free(this); @@ -70,4 +70,3 @@ user_t *user_create(void *param) return &this->public; } - diff --git a/src/medsrv/user.h b/src/medsrv/user.h index beeed6ec1..475972a5b 100644 --- a/src/medsrv/user.h +++ b/src/medsrv/user.h @@ -23,7 +23,7 @@ #ifndef USER_H_ #define USER_H_ -#include <context.h> +#include <fast_context.h> #include <library.h> typedef struct user_t user_t; @@ -36,7 +36,7 @@ struct user_t { /** * implements context_t interface */ - context_t context; + fast_context_t context; /** * Set the user ID of the logged in user. |