summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-03-26 00:15:04 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-03-26 00:15:04 +0100
commit74a1e62e59bd821f975c6e1cdebfb77c7b3a8ac4 (patch)
tree26a82d9f8008d446147176478ea79d74d5b7e0dd /database
parentdd6b7e31e9d0e38a15cb49b1a09036bf65531774 (diff)
downloadeurephia-74a1e62e59bd821f975c6e1cdebfb77c7b3a8ac4.tar.gz
eurephia-74a1e62e59bd821f975c6e1cdebfb77c7b3a8ac4.tar.xz
eurephia-74a1e62e59bd821f975c6e1cdebfb77c7b3a8ac4.zip
Cleaned up the code a little bit
Made sure we only include needed include files and checked that the copyright headers are equal and correct
Diffstat (limited to 'database')
-rw-r--r--database/eurephiadb.c14
-rw-r--r--database/eurephiadb_driver.h3
-rw-r--r--database/eurephiadb_mapping.c5
-rw-r--r--database/eurephiadb_mapping.h3
-rw-r--r--database/eurephiadb_struct.h3
-rw-r--r--database/sqlite/administration.c6
-rw-r--r--database/sqlite/edb-sqlite.c4
-rw-r--r--database/sqlite/fieldmapping.h3
-rw-r--r--database/sqlite/sql-schema.sql6
-rw-r--r--database/sqlite/sqlite.c6
-rw-r--r--database/sqlite/sqlite.h3
11 files changed, 26 insertions, 30 deletions
diff --git a/database/eurephiadb.c b/database/eurephiadb.c
index 3331362..4192475 100644
--- a/database/eurephiadb.c
+++ b/database/eurephiadb.c
@@ -1,6 +1,7 @@
/* eurephiadb.c -- Loads and initialises the database driver
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -19,20 +20,13 @@
*/
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <dlfcn.h>
-#include <stdarg.h>
#include "eurephia_nullsafe.h"
#include "eurephiadb_driver.h"
#include "eurephia_log.h"
#include "eurephia_getsym.h"
-#ifdef MEMWATCH
-#include <memwatch.h>
-#endif
-
int eDBlink_close(eurephiaCTX *ctx)
{
@@ -51,10 +45,6 @@ int eDBlink_close(eurephiaCTX *ctx)
int eDBlink_init(eurephiaCTX *ctx, const char *dbl, const int minver)
{
-#ifdef MEMWATCH
- mwStatistics(3);
-#endif
-
if( dbl == NULL ) {
eurephia_log(ctx, LOG_FATAL, 0, "No eurephia eDBlink driver given. "
"eurephia authentication will not be available");
diff --git a/database/eurephiadb_driver.h b/database/eurephiadb_driver.h
index 365fe49..cfe6563 100644
--- a/database/eurephiadb_driver.h
+++ b/database/eurephiadb_driver.h
@@ -1,6 +1,7 @@
/* eurephiadb_driver.h -- API provided by the database driver
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/database/eurephiadb_mapping.c b/database/eurephiadb_mapping.c
index c9adbca..277c334 100644
--- a/database/eurephiadb_mapping.c
+++ b/database/eurephiadb_mapping.c
@@ -1,6 +1,7 @@
/* eurephiadb_common.c -- Common database functions, used by drivers
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,8 +19,6 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <assert.h>
diff --git a/database/eurephiadb_mapping.h b/database/eurephiadb_mapping.h
index 4ce16f8..d203626 100644
--- a/database/eurephiadb_mapping.h
+++ b/database/eurephiadb_mapping.h
@@ -3,7 +3,8 @@
* to access specific database table fields
* through a unified API
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/database/eurephiadb_struct.h b/database/eurephiadb_struct.h
index fb96eeb..ff44131 100644
--- a/database/eurephiadb_struct.h
+++ b/database/eurephiadb_struct.h
@@ -1,6 +1,7 @@
/* eurephiadb_struct.h -- Database connection struct
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/database/sqlite/administration.c b/database/sqlite/administration.c
index fe25cf7..9ffc521 100644
--- a/database/sqlite/administration.c
+++ b/database/sqlite/administration.c
@@ -1,6 +1,7 @@
/* administration.c -- Functions needed for administration tasks
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,12 +19,9 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include <libxml/parser.h>
#include <libxml/tree.h>
#ifndef DRIVERAPIVERSION
diff --git a/database/sqlite/edb-sqlite.c b/database/sqlite/edb-sqlite.c
index 7a03871..7170859 100644
--- a/database/sqlite/edb-sqlite.c
+++ b/database/sqlite/edb-sqlite.c
@@ -1,7 +1,8 @@
/* eurephia-sqlite.c -- Main driver for eurephia authentication plugin for OpenVPN
* This is the SQLite database driver
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -20,7 +21,6 @@
*/
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <assert.h>
diff --git a/database/sqlite/fieldmapping.h b/database/sqlite/fieldmapping.h
index 5714e64..6e72b17 100644
--- a/database/sqlite/fieldmapping.h
+++ b/database/sqlite/fieldmapping.h
@@ -1,7 +1,8 @@
/* fieldmapping.h -- Contains mapping from internal eurephia field ID to
* SQLite3 specific field names per table
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/database/sqlite/sql-schema.sql b/database/sqlite/sql-schema.sql
index 7f0d1af..e6498f8 100644
--- a/database/sqlite/sql-schema.sql
+++ b/database/sqlite/sql-schema.sql
@@ -1,3 +1,9 @@
+--
+-- eurephia database schema for SQLite3
+--
+-- GPLv2 - Copyright 2008
+-- David Sommerseth
+
CREATE TABLE openvpn_certificates (
depth integer NOT NULL,
digest varchar(64) NOT NULL,
diff --git a/database/sqlite/sqlite.c b/database/sqlite/sqlite.c
index 1e79fb5..dfa7a0f 100644
--- a/database/sqlite/sqlite.c
+++ b/database/sqlite/sqlite.c
@@ -1,6 +1,7 @@
/* sqlite.c -- Generic functions to simplify SQLite3 queries
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,9 +19,6 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
#include <string.h>
#include <assert.h>
#include <sqlite3.h>
diff --git a/database/sqlite/sqlite.h b/database/sqlite/sqlite.h
index 8195c36..bfde65c 100644
--- a/database/sqlite/sqlite.h
+++ b/database/sqlite/sqlite.h
@@ -1,6 +1,7 @@
/* sqlite.h -- Generic functions to simplify SQLite3 queries - data structures defined here
*
- * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ * GPLv2 - Copyright (C) 2008, 2009
+ * David Sommerseth <dazo@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License