Skip to content

Commit

Permalink
lib/srdb1: removed trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 13, 2023
1 parent c278d4d commit fd9ccb4
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 83 deletions.
8 changes: 4 additions & 4 deletions src/lib/srdb1/db.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2001-2003 FhG Fokus
* Copyright (C) 2007-2008 1&1 Internet AG
*
*
* This file is part of Kamailio, a free SIP server.
*
* Kamailio is free software; you can redistribute it and/or modify
Expand All @@ -14,8 +14,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
*/

Expand Down Expand Up @@ -294,7 +294,7 @@ db1_con_t* db_do_init2(const str* url, void* (*new_connection)(), db_pooling_t p
LM_ERR("The configured db_url is too long\n");
return 0;
}

/* this is the root memory for this database connection. */
res = (db1_con_t*)pkg_malloc(con_size);
if (!res) {
Expand Down
46 changes: 23 additions & 23 deletions src/lib/srdb1/db.h
Expand Up @@ -14,8 +14,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
*/

Expand Down Expand Up @@ -53,7 +53,7 @@

/**
* \brief Specify table name that will be used for subsequent operations.
*
*
* The function db_use_table takes a table name and stores it db1_con_t structure.
* All subsequent operations (insert, delete, update, query) are performed on
* that table.
Expand All @@ -69,11 +69,11 @@ typedef int (*db_use_table_f)(db1_con_t* _h, const str * _t);
* This function initializes the database API and opens a new database
* connection. This function must be called after bind_dbmod but before any
* other database API function is called.
*
*
* The function takes one parameter, the parameter must contain the database
* connection URL. The URL is of the form
* connection URL. The URL is of the form
* mysql://username:password\@host:port/database where:
*
*
* username: Username to use when logging into database (optional).
* password: password if it was set (optional)
* host: Hosname or IP address of the host where database server lives (mandatory)
Expand All @@ -93,11 +93,11 @@ typedef db1_con_t* (*db_init_f) (const str* _sqlurl);
* This function initializes the database API and opens a new database
* connection. This function must be called after bind_dbmod but before any
* other database API function is called.
*
*
* The function takes one parameter, the parameter must contain the database
* connection URL. The URL is of the form
* connection URL. The URL is of the form
* mysql://username:password\@host:port/database where:
*
*
* username: Username to use when logging into database (optional).
* password: password if it was set (optional)
* host: Hosname or IP address of the host where database server lives (mandatory)
Expand All @@ -115,11 +115,11 @@ typedef db1_con_t* (*db_init2_f) (const str* _sqlurl, db_pooling_t _pooling);
/**
* \brief Close a database connection and free all memory used.
*
* The function closes previously open connection and frees all previously
* The function closes previously open connection and frees all previously
* allocated memory. The function db_close must be the very last function called.
* \param _h db1_con_t structure representing the database connection
*/
typedef void (*db_close_f) (db1_con_t* _h);
typedef void (*db_close_f) (db1_con_t* _h);


/**
Expand Down Expand Up @@ -223,11 +223,11 @@ typedef int (*db_free_result_f) (db1_con_t* _h, db1_res_t* _r);

/**
* \brief Insert a row into the specified table.
*
*
* This function implements INSERT SQL directive, you can insert one or more
* rows in a table using this function.
* \param _h database connection handle
* \param _k array of keys (column names)
* \param _k array of keys (column names)
* \param _v array of values for keys specified in _k parameter
* \param _n number of keys-value pairs int _k and _v parameters
* \return returns 0 if everything is OK, otherwise returns value < 0
Expand All @@ -244,7 +244,7 @@ typedef int (*db_insert_f) (const db1_con_t* _h, const db_key_t* _k,
* If _k is NULL and _v is NULL and _n is zero, all rows are deleted, the
* resulting table will be empty.
* If _o is NULL, the equal operator "=" will be used for the comparison.
*
*
* \param _h database connection handle
* \param _k array of keys (column names) that will be matched
* \param _o array of operators to be used with key-value pairs
Expand Down Expand Up @@ -301,7 +301,7 @@ typedef int (*db_replace_f) (const db1_con_t* handle, const db_key_t* keys,
* \brief Retrieve the last inserted ID in a table.
*
* The function returns the value generated for an AUTO_INCREMENT column by the
* previous INSERT or UPDATE statement. Use this function after you have
* previous INSERT or UPDATE statement. Use this function after you have
* performed an INSERT statement into a table that contains an AUTO_INCREMENT
* field.
* \param _h structure representing database connection
Expand All @@ -313,7 +313,7 @@ typedef int (*db_last_inserted_id_f) (const db1_con_t* _h);

/**
* \brief Insert a row into specified table, update on duplicate key.
*
*
* The function implements the INSERT ON DUPLICATE KEY UPDATE SQL directive.
* It is possible to insert a row and update if one already exists.
* The old row will not deleted before the insertion of the new data.
Expand Down Expand Up @@ -368,15 +368,15 @@ typedef int (*db_insert_async_f) (const db1_con_t* _h, const db_key_t* _k,
typedef int (*db_affected_rows_f) (const db1_con_t* _h);

/**
* \brief Start a single transaction that will consist of one or more queries.
* \brief Start a single transaction that will consist of one or more queries.
*
* \param _h structure representing database connection
* \return 0 if everything is OK, otherwise returns < 0
*/
typedef int (*db_start_transaction_f) (db1_con_t* _h, db_locking_t _l);

/**
* \brief End a transaction.
* \brief End a transaction.
*
* \param _h structure representing database connection
* \return 0 if everything is OK, otherwise returns < 0
Expand All @@ -395,7 +395,7 @@ typedef int (*db_abort_transaction_f) (db1_con_t* _h);

/**
* \brief Database module callbacks
*
*
* This structure holds function pointer to all database functions. Before this
* structure can be used it must be initialized with bind_dbmod.
* \see bind_dbmod
Expand All @@ -411,12 +411,12 @@ typedef struct db_func {
db_raw_query_f raw_query; /* Raw query - SQL */
db_free_result_f free_result; /* Free a query result */
db_insert_f insert; /* Insert into table */
db_delete_f delete; /* Delete from table */
db_delete_f delete; /* Delete from table */
db_update_f update; /* Update table */
db_replace_f replace; /* Replace row in a table */
db_last_inserted_id_f last_inserted_id; /* Retrieve the last inserted ID
in a table */
db_insert_update_f insert_update; /* Insert into table, update on duplicate key */
db_insert_update_f insert_update; /* Insert into table, update on duplicate key */
db_insert_delayed_f insert_delayed; /* Insert delayed into table */
db_insert_async_f insert_async; /* Insert async into table */
db_affected_rows_f affected_rows; /* Number of affected rows for last query */
Expand All @@ -432,7 +432,7 @@ typedef struct db_func {
* \brief Bind database module functions
*
* This function is special, it's only purpose is to call find_export function in
* the core and find the addresses of all other database related functions. The
* the core and find the addresses of all other database related functions. The
* db_func_t callback given as parameter is updated with the found addresses.
*
* This function must be called before any other database API call!
Expand Down Expand Up @@ -479,7 +479,7 @@ db1_con_t* db_do_init2(const str* url, void* (*new_connection)(), db_pooling_t p
/**
* \brief Helper for db_close function.
*
* This helper method does some work for the closing of a database
* This helper method does some work for the closing of a database
* connection. No function should be called after this
* \param _h database connection handle
* \param (*free_connection) Pointer to the db specific free_connection method
Expand Down
6 changes: 3 additions & 3 deletions src/lib/srdb1/db_cap.h
Expand Up @@ -14,8 +14,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
*/

Expand Down Expand Up @@ -52,7 +52,7 @@ typedef enum db_cap {


/*! \brief
* All database capabilities except raw_query, replace, insert_update and
* All database capabilities except raw_query, replace, insert_update and
* last_inserted_id which should be checked separately when needed
*/
#define DB_CAP_ALL (DB_CAP_QUERY | DB_CAP_INSERT | DB_CAP_DELETE | DB_CAP_UPDATE)
Expand Down
6 changes: 3 additions & 3 deletions src/lib/srdb1/db_con.h
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2001-2003 FhG Fokus
* Copyright (C) 2007-2008 1&1 Internet AG
*
Expand All @@ -14,8 +14,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
*/

Expand Down
8 changes: 4 additions & 4 deletions src/lib/srdb1/db_id.c
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2001-2005 iptel.org
* Copyright (C) 2007-2008 1&1 Internet AG
*
Expand All @@ -14,8 +14,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
*/

Expand Down Expand Up @@ -84,7 +84,7 @@ static int dupl_string_name(char** dst, const char* begin, const char* end)


/**
* Parse a database URL of form
* Parse a database URL of form
* scheme://[username[:password]@]hostname[:port]/database
*
* \param id filled id struct
Expand Down
8 changes: 4 additions & 4 deletions src/lib/srdb1/db_id.h
@@ -1,7 +1,7 @@
/*
/*
* Copyright (C) 2001-2005 iptel.org
* Copyright (C) 2007-2008 1&1 Internet AG
*
*
* This file is part of Kamailio, a free SIP server.
*
* Kamailio is free software; you can redistribute it and/or modify
Expand All @@ -14,8 +14,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
*/

Expand Down
6 changes: 3 additions & 3 deletions src/lib/srdb1/db_key.h
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2001-2003 FhG Fokus
* Copyright (C) 2007-2008 1&1 Internet AG
*
Expand All @@ -14,8 +14,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
*/

Expand Down
4 changes: 2 additions & 2 deletions src/lib/srdb1/db_locking.h
Expand Up @@ -11,8 +11,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
*/

Expand Down
6 changes: 3 additions & 3 deletions src/lib/srdb1/db_op.h
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2001-2003 FhG Fokus
* Copyright (C) 2007-2008 1&1 Internet AG
*
Expand All @@ -14,8 +14,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
*/

Expand Down
6 changes: 3 additions & 3 deletions src/lib/srdb1/db_pool.c
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2001-2005 iptel.org
* Copyright (C) 2007-2008 1&1 Internet AG
*
Expand All @@ -14,8 +14,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
*/

Expand Down
8 changes: 4 additions & 4 deletions src/lib/srdb1/db_pool.h
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2001-2005 iptel.org
* Copyright (C) 2007-2008 1&1 Internet AG
*
Expand All @@ -14,8 +14,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
*/

Expand Down Expand Up @@ -58,7 +58,7 @@ struct pool_con* pool_get(const struct db_id* id);

/**
* Insert a new connection into the pool.
* \param con the inserted connection
* \param con the inserted connection
*/
void pool_insert(struct pool_con* con);

Expand Down
4 changes: 2 additions & 2 deletions src/lib/srdb1/db_pooling.h
Expand Up @@ -14,8 +14,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
*/

Expand Down

0 comments on commit fd9ccb4

Please sign in to comment.