From 2776dc9e2add3acca8c47323559fd479104fc533 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 10 Mar 2020 16:11:14 +0100 Subject: [PATCH] db_cluster: trailing spaces removed (cherry picked from commit 40128763d8a987e4c64d51584f1d72872b53dff5) --- src/modules/db_cluster/db_cluster_mod.c | 8 ++++---- src/modules/db_cluster/dbcl_api.c | 6 +++--- src/modules/db_cluster/dbcl_api.h | 6 +++--- src/modules/db_cluster/dbcl_data.c | 17 ++++++++--------- src/modules/db_cluster/dbcl_data.h | 4 ++-- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/modules/db_cluster/db_cluster_mod.c b/src/modules/db_cluster/db_cluster_mod.c index d9c42b16f2d..2163f9da7fb 100644 --- a/src/modules/db_cluster/db_cluster_mod.c +++ b/src/modules/db_cluster/db_cluster_mod.c @@ -1,4 +1,4 @@ -/* +/* * Generic db cluster module interface * * Copyright (C) 2012 Daniel-Constantin Mierla (asipto.com) @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -56,7 +56,7 @@ static param_export_t params[] = { {0, 0, 0} }; -struct module_exports exports = { +struct module_exports exports = { "db_cluster", /* module name */ DEFAULT_DLFLAGS, /* dlopen flags */ cmds, /* exported functions */ diff --git a/src/modules/db_cluster/dbcl_api.c b/src/modules/db_cluster/dbcl_api.c index 111abcca20c..ebe7a9059a3 100644 --- a/src/modules/db_cluster/dbcl_api.c +++ b/src/modules/db_cluster/dbcl_api.c @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -383,7 +383,7 @@ int db_cluster_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _ /*! \brief * Delete a row from table */ -int db_cluster_delete(const db1_con_t* _h, const db_key_t* _k, const +int db_cluster_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o, const db_val_t* _v, const int _n) { LM_DBG("executing db cluster delete command\n"); diff --git a/src/modules/db_cluster/dbcl_api.h b/src/modules/db_cluster/dbcl_api.h index ad95e810448..ae125acb800 100644 --- a/src/modules/db_cluster/dbcl_api.h +++ b/src/modules/db_cluster/dbcl_api.h @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -86,7 +86,7 @@ int db_cluster_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _ /*! \brief * Delete a row from table */ -int db_cluster_delete(const db1_con_t* _h, const db_key_t* _k, const +int db_cluster_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o, const db_val_t* _v, const int _n); diff --git a/src/modules/db_cluster/dbcl_data.c b/src/modules/db_cluster/dbcl_data.c index c7651724428..f3cb2dcbf89 100644 --- a/src/modules/db_cluster/dbcl_data.c +++ b/src/modules/db_cluster/dbcl_data.c @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -407,7 +407,7 @@ int dbcl_init_dbf(dbcl_cls_t *cls) { if(db_bind_mod(&cls->rlist[i].clist[j]->db_url, &cls->rlist[i].clist[j]->dbf)<0) - { + { LM_ERR("unable to bind database module\n"); return -1; } @@ -420,7 +420,7 @@ int dbcl_init_dbf(dbcl_cls_t *cls) { if(db_bind_mod(&cls->wlist[i].clist[j]->db_url, &cls->wlist[i].clist[j]->dbf)<0) - { + { LM_ERR("unable to bind database module\n"); return -1; } @@ -447,8 +447,8 @@ int dbcl_init_connections(dbcl_cls_t *cls) LM_DBG("setting up read connection [%.*s]\n", cls->rlist[i].clist[j]->name.len, cls->rlist[i].clist[j]->name.s); - cls->rlist[i].clist[j]->dbh = - cls->rlist[i].clist[j]->dbf.init(&cls->rlist[i].clist[j]->db_url); + cls->rlist[i].clist[j]->dbh = + cls->rlist[i].clist[j]->dbf.init(&cls->rlist[i].clist[j]->db_url); if(cls->rlist[i].clist[j]->dbh==NULL) { LM_WARN("cannot connect to database - connection [%.*s]\n", @@ -465,8 +465,8 @@ int dbcl_init_connections(dbcl_cls_t *cls) LM_DBG("setting up write connection [%.*s]\n", cls->wlist[i].clist[j]->name.len, cls->wlist[i].clist[j]->name.s); - cls->wlist[i].clist[j]->dbh = - cls->wlist[i].clist[j]->dbf.init(&cls->wlist[i].clist[j]->db_url); + cls->wlist[i].clist[j]->dbh = + cls->wlist[i].clist[j]->dbf.init(&cls->wlist[i].clist[j]->db_url); if(cls->wlist[i].clist[j]->dbh==NULL) { LM_WARN("cannot connect to database - connection [%.*s]\n", @@ -494,7 +494,6 @@ int dbcl_close_connections(dbcl_cls_t *cls) if(cls->rlist[i].clist[j] != NULL && cls->rlist[i].clist[j]->flags!=0 && cls->rlist[i].clist[j]->dbh != NULL) { - cls->rlist[i].clist[j]->dbf.close(cls->rlist[i].clist[j]->dbh); cls->rlist[i].clist[j]->dbh = NULL; } diff --git a/src/modules/db_cluster/dbcl_data.h b/src/modules/db_cluster/dbcl_data.h index 1c17c074eb5..edfb664b772 100644 --- a/src/modules/db_cluster/dbcl_data.h +++ b/src/modules/db_cluster/dbcl_data.h @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */