Module: kamailio
Branch: master
Commit: c8533037c916497c328d0ed4e30a6ef51dfc8882
URL:
https://github.com/kamailio/kamailio/commit/c8533037c916497c328d0ed4e30a6ef…
Author: Luis Azedo <luis(a)2600hz.com>
Committer: Luis Azedo <luis(a)2600hz.com>
Date: 2015-02-16T14:52:02Z
db_text - fix indentation
---
Modified: modules/db_text/dbt_base.c
Modified: modules/db_text/dbt_res.h
---
Diff:
https://github.com/kamailio/kamailio/commit/c8533037c916497c328d0ed4e30a6ef…
Patch:
https://github.com/kamailio/kamailio/commit/c8533037c916497c328d0ed4e30a6ef…
---
diff --git a/modules/db_text/dbt_base.c b/modules/db_text/dbt_base.c
index e862e86..1a7f10c 100644
--- a/modules/db_text/dbt_base.c
+++ b/modules/db_text/dbt_base.c
@@ -340,13 +340,13 @@ int dbt_raw_query(db1_con_t* _h, char* _s, db1_res_t** _r)
*/
int dbt_affected_rows(db1_con_t* _h)
{
- if (!_h || !CON_TABLE(_h))
- {
- LM_ERR("invalid parameter\n");
- return -1;
- }
+ if (!_h || !CON_TABLE(_h))
+ {
+ LM_ERR("invalid parameter\n");
+ return -1;
+ }
- return ((dbt_con_p)_h->tail)->affected;
+ return ((dbt_con_p)_h->tail)->affected;
}
/*
@@ -364,8 +364,8 @@ int dbt_insert(db1_con_t* _h, db_key_t* _k, db_val_t* _v, int _n)
LM_ERR("invalid parameter\n");
return -1;
}
-
- ((dbt_con_p)_h->tail)->affected = 0;
+
+ ((dbt_con_p)_h->tail)->affected = 0;
if(!_k || !_v || _n<=0)
{
@@ -424,7 +424,7 @@ int dbt_insert(db1_con_t* _h, db_key_t* _k, db_val_t* _v, int _n)
goto clean;
}
- ((dbt_con_p)_h->tail)->affected = 1;
+ ((dbt_con_p)_h->tail)->affected = 1;
/* dbt_print_table(_tbc, NULL); */
@@ -471,7 +471,7 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
int _n)
return -1;
}
- ((dbt_con_p)_h->tail)->affected = 0;
+ ((dbt_con_p)_h->tail)->affected = 0;
/* lock database */
_tbc = dbt_db_get_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
@@ -485,7 +485,7 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
int _n)
if(!_k || !_v || _n<=0)
{
LM_DBG("deleting all records\n");
- ((dbt_con_p)_h->tail)->affected = _tbc->nrrows;
+ ((dbt_con_p)_h->tail)->affected = _tbc->nrrows;
dbt_table_free_rows(_tbc);
/* unlock databse */
dbt_release_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
@@ -513,7 +513,7 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
int _n)
// free row
dbt_row_free(_tbc, _drp);
- ((dbt_con_p)_h->tail)->affected++;
+ ((dbt_con_p)_h->tail)->affected++;
}
_drp = _drp0;
@@ -556,7 +556,7 @@ int dbt_update(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t*
_v,
return -1;
}
- ((dbt_con_p)_h->tail)->affected = 0;
+ ((dbt_con_p)_h->tail)->affected = 0;
/* lock database */
_tbc = dbt_db_get_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
@@ -597,7 +597,7 @@ int dbt_update(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t*
_v,
}
}
- ((dbt_con_p)_h->tail)->affected++;
+ ((dbt_con_p)_h->tail)->affected++;
}
_drp = _drp->next;
diff --git a/modules/db_text/dbt_res.h b/modules/db_text/dbt_res.h
index 00bdb40..0f908e7 100644
--- a/modules/db_text/dbt_res.h
+++ b/modules/db_text/dbt_res.h
@@ -47,7 +47,7 @@ typedef struct _dbt_result
typedef struct _dbt_con
{
dbt_cache_p con;
- int affected;
+ int affected;
} dbt_con_t, *dbt_con_p;
#define DBT_CON_CONNECTION(db_con) (((dbt_con_p)((db_con)->tail))->con)