Module: kamailio
Branch: master
Commit: c7e7255540944f90a379bde2d084785ee05f3a3b
URL:
https://github.com/kamailio/kamailio/commit/c7e7255540944f90a379bde2d084785…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-05-20T08:57:53+02:00
db_sqlite: move declaration of variables at beginning of function
- removed para tag from xml doc files
---
Modified: src/modules/db_sqlite/dbase.c
Modified: src/modules/db_sqlite/doc/db_sqlite_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/c7e7255540944f90a379bde2d084785…
Patch:
https://github.com/kamailio/kamailio/commit/c7e7255540944f90a379bde2d084785…
---
diff --git a/src/modules/db_sqlite/dbase.c b/src/modules/db_sqlite/dbase.c
index cf33c83086..a2f852c192 100644
--- a/src/modules/db_sqlite/dbase.c
+++ b/src/modules/db_sqlite/dbase.c
@@ -50,6 +50,8 @@ static struct sqlite_connection * db_sqlite_new_connection(const struct
db_id* i
{
struct sqlite_connection *con;
int rc;
+ int flags = 0;
+ db_param_list_t *db_param;
con = pkg_malloc(sizeof(*con));
if (!con) {
@@ -61,8 +63,7 @@ static struct sqlite_connection * db_sqlite_new_connection(const struct
db_id* i
con->hdr.ref = 1;
con->hdr.id = (struct db_id*) id; /* set here - freed on error */
- int flags = 0;
- db_param_list_t *db_param = db_param_list_search(id->database);
+ db_param = db_param_list_search(id->database);
if (db_param && db_param->readonly) {
// The database is opened in read-only mode. If the database does not already exist, an
error is returned.
flags |= SQLITE_OPEN_READONLY;
diff --git a/src/modules/db_sqlite/doc/db_sqlite_admin.xml
b/src/modules/db_sqlite/doc/db_sqlite_admin.xml
index 534cf87101..695e0d4004 100644
--- a/src/modules/db_sqlite/doc/db_sqlite_admin.xml
+++ b/src/modules/db_sqlite/doc/db_sqlite_admin.xml
@@ -63,7 +63,6 @@
<section>
<title>Parameters</title>
- <para>
<section id="db_sqlite.p.db_set_readonly">
<title><varname>db_set_readonly</varname> (string)</title>
@@ -87,7 +86,6 @@
modparam("sqlops","sqlcon","lrn=>sqlite:////var/mydb.sqlite")
# Example if using
</programlisting>
</example>
</section>
- </para>
</section>
<section>