aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_odbc.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-11 03:14:05 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-11 03:14:05 +0000
commit5f90b9bebddfa06f9d08b63e9c48830071480f38 (patch)
tree47f92d29e3216d69801be7bdb5d15fef7aab9a4d /funcs/func_odbc.c
parent7acc893dad48c008eaced05bfbedb0d17735bc47 (diff)
build function modules independently (no more pbx_functions.so)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9469 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_odbc.c')
-rw-r--r--funcs/func_odbc.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index f7f7637b3..585d60256 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -1,13 +1,19 @@
/*
- * Asterisk -- A telephony toolkit for Linux.
+ * Asterisk -- An open source telephony toolkit.
*
- * func_odbc
- *
* Copyright (c) 2005 Tilghman Lesher
*
* Tilghman Lesher <func_odbc__200508@the-tilghman.com>
*
- * Special thanks to Anthony Minessale II for debugging help.
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
*/
/*!
@@ -23,14 +29,20 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <asterisk/file.h>
-#include <asterisk/logger.h>
-#include <asterisk/options.h>
-#include <asterisk/channel.h>
-#include <asterisk/pbx.h>
-#include <asterisk/module.h>
-#include <asterisk/config.h>
-#include <asterisk/res_odbc.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 7682 $")
+
+#include "asterisk/module.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/options.h"
+#include "asterisk/channel.h"
+#include "asterisk/pbx.h"
+#include "asterisk/module.h"
+#include "asterisk/config.h"
+#include "asterisk/res_odbc.h"
static char *tdesc = "ODBC lookups";
@@ -372,7 +384,7 @@ static char *acf_escape(struct ast_channel *chan, char *cmd, char *data, char *b
return buf;
}
-struct ast_custom_function escape_function = {
+static struct ast_custom_function escape_function = {
.name = "SQL_ESC",
.synopsis = "Escapes single ticks for use in SQL statements",
.syntax = "SQL_ESC(<string>)",
@@ -497,8 +509,8 @@ static int odbc_load_module(void)
}
for (catg = ast_category_browse(cfg, NULL);
- catg;
- catg = ast_category_browse(cfg, catg)) {
+ catg;
+ catg = ast_category_browse(cfg, catg)) {
struct acf_odbc_query *query=NULL;
if (init_acf_query(cfg, catg, &query)) {
@@ -569,8 +581,8 @@ int reload(void)
}
for (catg = ast_category_browse(cfg, NULL);
- catg;
- catg = ast_category_browse(cfg, catg)) {
+ catg;
+ catg = ast_category_browse(cfg, catg)) {
struct acf_odbc_query *query = NULL;
/* We do this piecemeal, so that we stay in a consistent state, if there's ever an error */