Browse Source

Merge remote-tracking branch 'upstream/master' into getifaddrs

Christian Kuehnke 9 years ago
parent
commit
875950d626
4 changed files with 33 additions and 36 deletions
  1. 0 24
      modules/cnxcc/cnxcc.c
  2. 24 3
      modules/cnxcc/cnxcc.h
  3. 3 3
      modules/matrix/README
  4. 6 6
      modules/matrix/doc/matrix_admin.xml

+ 0 - 24
modules/cnxcc/cnxcc.c

@@ -28,30 +28,6 @@
 
 #include "cnxcc.h"
 
-inline void get_datetime(str *dest)
-{
-	timestamp2isodt(dest, get_current_timestamp());
-}
-
-inline unsigned int get_current_timestamp()
-{
-	return time(NULL);
-}
-
-inline int timestamp2isodt(str *dest, unsigned int timestamp)
-{
-	time_t  		tim;
-	struct tm 		*tmPtr;
-
-	tim 		= timestamp;
-	tmPtr 		= localtime(&tim);
-
-	strftime( dest->s, DATETIME_SIZE, "%Y-%m-%d %H:%M:%S", tmPtr);
-	dest->len	= DATETIME_LENGTH;
-
-	return 0;
-}
-
 double str2double(str *string)
 {
 	char buffer[string->len + 1];

+ 24 - 3
modules/cnxcc/cnxcc.h

@@ -31,9 +31,30 @@
 #define DATETIME_LENGTH		DATETIME_SIZE - 1
 
 
-inline void get_datetime(str *dest);
-inline unsigned int get_current_timestamp();
-inline int timestamp2isodt(str *dest, unsigned int timestamp);
+static inline unsigned int get_current_timestamp()
+{
+	return time(NULL);
+}
+
+static inline int timestamp2isodt(str *dest, unsigned int timestamp)
+{
+	time_t  		tim;
+	struct tm 		*tmPtr;
+
+	tim 		= timestamp;
+	tmPtr 		= localtime(&tim);
+
+	strftime( dest->s, DATETIME_SIZE, "%Y-%m-%d %H:%M:%S", tmPtr);
+	dest->len	= DATETIME_LENGTH;
+
+	return 0;
+}
+
+static inline void get_datetime(str *dest)
+{
+	timestamp2isodt(dest, get_current_timestamp());
+}
+
 double str2double(str *string);
 
 #endif /* _CNXCC_H */

+ 3 - 3
modules/matrix/README

@@ -139,11 +139,11 @@ Chapter 1. Admin Guide
 
    The URL for the database connection.
 
-   Default value is "mysql://openserro:openserro@localhost/openser".
+   Default value is "mysql://kamailioro:kamailioro@localhost/kamailio".
 
    Example 1.1. Set db_url parameter
 ...
-modparam("matrix", "db_url", "mysql://openserro:openserro@localhost/openser")
+modparam("matrix", "db_url", "mysql://kamailioro:kamailioro@localhost/kamailio")
 ...
 
 3.2. matrix_table (string)
@@ -264,7 +264,7 @@ Chapter 2. Module parameter for database access.
 
    URL to the database containing the data.
 
-   Default value is "mysql://openserro:openserro@localhost/openser".
+   Default value is "mysql://kamailioro:kamailioro@localhost/kamailio".
 
    Example 2.1. Set db_url parameter
 ...

+ 6 - 6
modules/matrix/doc/matrix_admin.xml

@@ -62,7 +62,7 @@
 
 <section>
 	<title>Parameters</title>
-	<section>
+	<section id="matrix.p.db_url">
 		<title><varname>db_url</varname> (string)</title>
 	  <para>
 			The URL for the database connection.
@@ -81,7 +81,7 @@ modparam("matrix", "db_url", "&defaultrodb;")
 		  </programlisting>
 	  </example>
   </section>
-	<section>
+	<section id="matrix.p.matrix_table">
 		<title><varname>matrix_table</varname> (string)</title>
 	  <para>
 			The name of the table containing the matrix data.
@@ -100,7 +100,7 @@ modparam("matrix", "matrix_table", "matrix")
 		  </programlisting>
 	  </example>
   </section>
-	<section>
+	<section id="matrix.p.matrix_first_col">
 		<title><varname>matrix_first_col</varname> (string)</title>
 	  <para>
 			The name of the column containing the first row in the matrix.
@@ -119,7 +119,7 @@ modparam("matrix", "matrix_first_col", "first")
 		  </programlisting>
 	  </example>
   </section>
-	<section>
+	<section id="matrix.p.matrix_second_col">
 		<title><varname>matrix_second_col</varname> (string)</title>
 	  <para>
 			The name of the column containing the second row in the matrix.
@@ -138,7 +138,7 @@ modparam("matrix", "matrix_second_col", "second")
 		  </programlisting>
 	  </example>
   </section>
-	<section>
+	<section id="matrix.p.matrix_res_col">
 		<title><varname>matrix_res_col</varname> (string)</title>
 	  <para>
 			The name of the column containing the result ID to be used.
@@ -160,7 +160,7 @@ modparam("matrix", "matrix_res_col", "res")
 </section>
 <section>
 	<title>Functions</title>
-	<section>
+	<section id="matrix.f.matrix">
 	  <title>
 			<function moreinfo="none">matrix (string first, string second, string dstavp)</function>
 		</title>