فهرست منبع

lib/srdb1: typo fixes

dilyanpalauzov 2 سال پیش
والد
کامیت
7af3e9cc6e

+ 7 - 7
src/lib/srdb1/db.h

@@ -66,7 +66,7 @@ typedef int (*db_use_table_f)(db1_con_t* _h, const str * _t);
 /**
  * \brief Initialize database connection and obtain the connection handle.
  *
- * This function initialize the database API and open a new database
+ * 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.
  * 
@@ -90,7 +90,7 @@ typedef db1_con_t* (*db_init_f) (const str* _sqlurl);
 /**
  * \brief Initialize database connection and obtain the connection handle.
  *
- * This function initialize the database API and open a new database
+ * 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.
  * 
@@ -129,7 +129,7 @@ typedef void (*db_close_f) (db1_con_t* _h);
  * If _k and _v parameters are NULL and _n is zero, you will get the whole table.
  *
  * if _c is NULL and _nc is zero, you will get all table columns in the result.
- * _r will point to a dynamically allocated structure, it is neccessary to call
+ * _r will point to a dynamically allocated structure, it is necessary to call
  * db_free_result function once you are finished with the result.
  *
  * If _op is 0, equal (=) will be used for all key-value pairs comparisons.
@@ -159,7 +159,7 @@ typedef int (*db_query_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_
  * \brief Gets a partial result set, fetch rows from a result
  *
  * Gets a partial result set, fetch a number of rows from a database result.
- * This function initialize the given result structure on the first run, and
+ * This function initializes the given result structure on the first run, and
  * fetches the nrows number of rows. On subsequenting runs, it uses the
  * existing result and fetches more rows, until it reaches the end of the
  * result set. Because of this the result needs to be null in the first
@@ -212,7 +212,7 @@ typedef int (*db_raw_query_async_f) (const db1_con_t* _h, const str* _s);
  * \brief Free a result allocated by db_query.
  *
  * This function frees all memory allocated previously in db_query. Its
- * neccessary to call this function on a db1_res_t structure if you don't need the
+ * necessary to call this function on a db1_res_t structure if you don't need the
  * structure anymore. You must call this function before you call db_query again!
  * \param _h database connection handle
  * \param _r pointer to db1_res_t structure to destroy
@@ -419,7 +419,7 @@ typedef struct db_func {
 	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; /* Numer of affected rows for last query */
+	db_affected_rows_f affected_rows; /* Number of affected rows for last query */
 	db_start_transaction_f start_transaction; /* Start a single transaction consisting of multiple queries */
 	db_end_transaction_f end_transaction; /* End a transaction */
 	db_abort_transaction_f abort_transaction; /* Abort a transaction */
@@ -482,7 +482,7 @@ db1_con_t* db_do_init2(const str* url, void* (*new_connection)(), db_pooling_t p
  * 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 specifc free_connection method
+ * \param (*free_connection) Pointer to the db specific free_connection method
  */
 void db_do_close(db1_con_t* _h, void (*free_connection)());
 

+ 1 - 1
src/lib/srdb1/db_query.c

@@ -450,7 +450,7 @@ static int db_fetch_query_internal(db_func_t *dbf, int frows,
 	} else {
 		if(_query(_h, _k, _op, _v, _c, _n, _nc, _o, _r) < 0)
 		{
-			LM_ERR("unable to do full db querry\n");
+			LM_ERR("unable to do full db query\n");
 			goto error;
 		}
 	}

+ 10 - 10
src/lib/srdb1/db_query.h

@@ -47,7 +47,7 @@
  *
  * This method evaluates the actual arguments for the database query and
  * setups the string that is used for the query in the db module.
- * Then its submit the query and stores the result if necessary. It uses for
+ * Then it submits the query and stores the result if necessary. It uses for
  * its work the implementation in the concrete database module.
  *
  * \param _h structure representing database connection
@@ -56,7 +56,7 @@
  * \param _v values of the keys that must match
  * \param _c column names that should be returned
  * \param _n number of key/value pairs that are compared, if zero then no comparison is done
- * \param _nc number of colums that should be returned
+ * \param _nc number of columns that should be returned
  * \param _o order by the specificied column, optional
  * \param _r the result that is returned, set to NULL if you want to use fetch_result later
  * \param (*val2str) function pointer to the db specific val conversion function
@@ -75,7 +75,7 @@ int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
  *
  * This method evaluates the actual arguments for the database query and
  * setups the string that is used for the query in the db module.
- * Then its submit the query and stores the result if necessary. It uses for
+ * Then it submits the query and stores the result if necessary. It uses for
  * its work the implementation in the concrete database module.
  *
  * \param _h structure representing database connection
@@ -84,7 +84,7 @@ int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
  * \param _v values of the keys that must match
  * \param _c column names that should be returned
  * \param _n number of key/value pairs that are compared, if zero then no comparison is done
- * \param _nc number of colums that should be returned
+ * \param _nc number of columns that should be returned
  * \param _o order by the specificied column, optional
  * \param _r the result that is returned, set to NULL if you want to use fetch_result later
  * \param (*val2str) function pointer to the db specific val conversion function
@@ -103,7 +103,7 @@ int db_do_query_lock(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op
  *
  * This method evaluates the actual arguments for the database raw query
  * and setups the string that is used for the query in the db module.
- * Then its submit the query and stores the result if necessary.
+ * Then it submits the query and stores the result if necessary.
  * It uses for its work the implementation in the concrete database module.
  *
  * \param _h structure representing database connection
@@ -123,7 +123,7 @@ int db_do_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r,
  *
  * This method evaluates the actual arguments for the database operation
  * and setups the string that is used for the insert operation in the db
- * module. Then its submit the query for the operation. It uses for its work
+ * module. Then it submits the query for the operation. It uses for its work
  * the implementation in the concrete database module.
  *
  * \param _h structure representing database connection
@@ -144,7 +144,7 @@ int db_do_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
  *
  * This method evaluates the actual arguments for the database operation
  * and setups the string that is used for the delete operation in the db
- * module. Then its submit the query for the operation. It uses for its work
+ * module. Then it submits the query for the operation. It uses for its work
  * the implementation in the concrete database module.
  *
  * \param _h structure representing database connection
@@ -167,7 +167,7 @@ int db_do_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
  *
  * This method evaluates the actual arguments for the database operation
  * and setups the string that is used for the update operation in the db
- * module. Then its submit the query for the operation. It uses for its work
+ * module. Then it submits the query for the operation. It uses for its work
  * the implementation in the concrete database module.
  *
  * \param _h structure representing database connection
@@ -193,7 +193,7 @@ int db_do_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
  *
  * This helper method evaluates the actual arguments for the database operation
  * and setups the string that is used for the replace operation in the db
- * module. Then its submit the query for the operation. It uses for its work the
+ * module. Then it submits the query for the operation. It uses for its work the
  * implementation in the concrete database module.
  *
  * \param _h structure representing database connection
@@ -214,7 +214,7 @@ int db_do_replace(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
  *
  * This method evaluates the actual arguments for the database operation
  * and setups the string that is used for the insert delayed operation in the db
- * module. Then its submit the query for the operation. It uses for its work
+ * module. Then it submits the query for the operation. It uses for its work
  * the implementation in the concrete database module.
  *
  * \param _h structure representing database connection

+ 1 - 1
src/lib/srdb1/db_res.h

@@ -46,7 +46,7 @@ struct db_row;
  * This type represents a result returned by db_query function (see below). The
  * result can consist of zero or more rows (see db_row_t description).
  *
- * Note: A variable of type db1_res_t returned by db_query function uses dynamicaly
+ * Note: A variable of type db1_res_t returned by db_query function uses dynamically
  * allocated memory, don't forget to call db_free_result if you don't need the
  * variable anymore. You will encounter memory leaks if you fail to do this!
  *

+ 2 - 2
src/lib/srdb1/db_row.c

@@ -48,7 +48,7 @@ int db_free_row(db_row_t* _r)
 	}
 
 	/*
-	 * Loop thru each columm, then check to determine if the storage pointed to
+	 * Loop thru each column, then check to determine if the storage pointed to
 	 * by db_val_t structure must be freed. This is required for all data types
 	 * which use a pointer to a buffer like DB1_STRING, DB1_STR and DB1_BLOB and
 	 * the database module copied them during the assignment.
@@ -88,7 +88,7 @@ int db_free_row(db_row_t* _r)
 				break;
 		}
 	}
-	/* now as we freed all, set number of colums to zero again */
+	/* now as we freed all, set number of columns to zero again */
 	ROW_N(_r) = 0;
 
 	if (ROW_VALUES(_r)) {

+ 1 - 1
src/lib/srdb1/db_row.h

@@ -49,7 +49,7 @@ typedef struct db_row {
 
 /** Return the columns in the row */
 #define ROW_VALUES(rw) ((rw)->values)
-/** Return the number of colums */
+/** Return the number of columns */
 #define ROW_N(rw)      ((rw)->n)
 
 /**

+ 2 - 2
src/lib/srdb1/db_val.c

@@ -30,7 +30,7 @@
  * Convert a str to a db value, copy strings if _cpy is not zero.
  * Copying is not necessary if the result from the database client library
  * is freed after the result inside the server is processed. If the result
- * is freed earlier, e.g. because its saved inside some temporary storage,
+ * is freed earlier, e.g. because it is saved inside some temporary storage,
  * then it must be copied in order to be use it reliable.
  *
  * \param _t destination value type
@@ -50,7 +50,7 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
 		LM_ERR("invalid parameter value\n");
 		return -1;
 	}
-	/* A NULL string is a SQL NULL value, otherwise its an empty value */
+	/* A NULL string is a SQL NULL value, otherwise it is an empty value */
 	if (!_s) {
 		LM_DBG("converting NULL value\n");
 		memset(_v, 0, sizeof(db_val_t));

+ 1 - 1
src/lib/srdb1/db_val.h

@@ -63,7 +63,7 @@ typedef enum {
 
 /**
  * This structure represents a value in the database. Several datatypes are
- * recognized and converted by the database API. These datatypes are automaticaly
+ * recognized and converted by the database API. These datatypes are automatically
  * recognized, converted from internal database representation and stored in the
  * variable of corresponding type.
  *

+ 1 - 1
src/lib/srdb1/schema/carrierroute.xml

@@ -98,7 +98,7 @@
 			  If all probabilities for a given prefix, tree and domain don't add to 100%,
 			  the prefix values will be adjusted according the given prob values. E.g. if
 			  three hosts with prob values of 0.5, 0.5 and 0.4 are defined, the resulting
-			  probabilities are 35.714, 35.714 and 28.571%. But its better to choose meaningful
+			  probabilities are 35.714, 35.714 and 28.571%. But it is better to choose meaningful
 			  values in the first place because of clarity.
 			  </para></description>
 		  </column>

+ 1 - 1
src/lib/srdb1/schema/template.xml

@@ -52,7 +52,7 @@
 
     <index>
         <name>blub</name>
-        <!--<primary/> -> PRIMARY KEY over more than one colums -->
+        <!--<primary/> -> PRIMARY KEY over more than one column -->
         <colref linkend="bla"/> <!-- link to the node with these id -->
         <colref linkend="id"/>
     </index>