Module: sip-router
Branch: janakj/bdb
Commit: 0b20fe03d98988177ca55954bfbc14d50feb9f2b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0b20fe0…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed Feb 27 13:53:33 2008 +0000
- first round of cleanups for documentation
- remove all FAQ and DEVEL files considered empty in content (no content at all
or just the default lines)
- remove of the <RevHistory>/</RevHistory> tag (and of course anything between
them)
- remove the comments at the end of the file that begins with
"<!-- Keep this element at the end of the file"
- credits for the patch/ the change scripts goes to Edson Gellert Schubert,
4lists at gmail dot com
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3769 689a6050-402a-0410-94f2-e92a70836424
---
modules/db_berkeley/km_doc/db_berkeley_devel.sgml | 22 -------
modules/db_berkeley/km_doc/db_berkeley_faq.sgml | 70 ---------------------
modules/db_berkeley/km_doc/db_berkeley_user.sgml | 11 ---
3 files changed, 0 insertions(+), 103 deletions(-)
diff --git a/modules/db_berkeley/km_doc/db_berkeley_devel.sgml b/modules/db_berkeley/km_doc/db_berkeley_devel.sgml
deleted file mode 100644
index 1c666a4..0000000
--- a/modules/db_berkeley/km_doc/db_berkeley_devel.sgml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!-- Module Developer's Guide -->
-
-<chapter>
- <chapterinfo>
- <revhistory>
- <revision>
- <revnumber>$Revision: 846 $</revnumber>
- <date>$Date: 2006-05-22 09:15:40 -0500 (Mon, 22 May 2006) $</date>
- </revision>
- </revhistory>
- </chapterinfo>
- <title>Developer's Guide</title>
- <para>
- The module does not provide any <acronym>API</acronym> to use in other &ser; modules.
- </para>
-</chapter>
-
-<!-- Keep this element at the end of the file
-Local Variables:
-sgml-parent-document: ("db_berkeley.sgml" "book" "chapter")
-End:
--->
diff --git a/modules/db_berkeley/km_doc/db_berkeley_faq.sgml b/modules/db_berkeley/km_doc/db_berkeley_faq.sgml
deleted file mode 100644
index 4fc364e..0000000
--- a/modules/db_berkeley/km_doc/db_berkeley_faq.sgml
+++ /dev/null
@@ -1,70 +0,0 @@
-<!-- Module FAQ -->
-
-<chapter>
- <chapterinfo>
- <revhistory>
- <revision>
- <revnumber>$Revision: 846 $</revnumber>
- <date>$Date: 2006-05-22 09:15:40 -0500 (Mon, 22 May 2006) $</date>
- </revision>
- </revhistory>
- </chapterinfo>
- <title>Frequently Asked Questions</title>
- <qandaset defaultlabel="number">
- <qandaentry>
- <question>
- <para>Where can I find more about OpenSER?</para>
- </question>
- <answer>
- <para>
- Take a look at &serhomelink;.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>Where can I post a question about this module?</para>
- </question>
- <answer>
- <para>
- First at all check if your question was already answered on one of
- our mailing lists:
- </para>
- <itemizedlist>
- <listitem>
- <para>User Mailing List - &seruserslink;</para>
- </listitem>
- <listitem>
- <para>Developer Mailing List - &serdevlink;</para>
- </listitem>
- </itemizedlist>
- <para>
- E-mails regarding any stable &ser; release should be sent to
- &serusersmail; and e-mails regarding development versions
- should be sent to &serdevmail;.
- </para>
- <para>
- If you want to keep the mail private, send it to
- &serhelpmail;.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>How can I report a bug?</para>
- </question>
- <answer>
- <para>
- Please follow the guidelines provided at:
- &serbugslink;.
- </para>
- </answer>
- </qandaentry>
- </qandaset>
-</chapter>
-
-<!-- Keep this element at the end of the file
-Local Variables:
-sgml-parent-document: ("db_berkeley.sgml" "Book" "chapter")
-End:
--->
diff --git a/modules/db_berkeley/km_doc/db_berkeley_user.sgml b/modules/db_berkeley/km_doc/db_berkeley_user.sgml
index b2bd6e3..affdf40 100644
--- a/modules/db_berkeley/km_doc/db_berkeley_user.sgml
+++ b/modules/db_berkeley/km_doc/db_berkeley_user.sgml
@@ -2,12 +2,6 @@
<chapter>
<chapterinfo>
- <revhistory>
- <revision>
- <revnumber>$Revision: 846 $</revnumber>
- <date>$Date: 2006-05-22 09:15:40 -0500 (Mon, 22 May 2006) $</date>
- </revision>
- </revhistory>
</chapterinfo>
<title>User's Guide</title>
@@ -587,8 +581,3 @@ usage: ./bdb_recover -s schemadir [-h home] [-R lastN]
</chapter>
-<!-- Keep this element at the end of the file
-Local Variables:
-sgml-parent-document: "db_berkeley.sgml" "Book" "chapter")
-End:
--->
Module: sip-router
Branch: janakj/bdb
Commit: 1bae0321cddb37c8fa9e3f58f9df1b5efee814aa
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1bae032…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed Feb 6 15:46:09 2008 +0000
further changes after the db name change
- update INSTALL file
- fix Makefile skip modules variable
- fix module Makefile, lib name
- change db_bind_mod to add the db prefix in the function
- change db url defines in db_berkeley and db_text
- change database modules names in module struct
- fix debian packaging
- fix tests
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3642 689a6050-402a-0410-94f2-e92a70836424
---
modules/db_berkeley/km_README | 4 ++--
modules/db_berkeley/km_db_berkeley.c | 2 +-
modules/db_berkeley/km_doc/db_berkeley_user.sgml | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/db_berkeley/km_README b/modules/db_berkeley/km_README
index 1f7dda5..4cc84b4 100644
--- a/modules/db_berkeley/km_README
+++ b/modules/db_berkeley/km_README
@@ -228,8 +228,8 @@ by default none is loaded
Modify the OpenSER configuration file to use db_berkeley
module. The database URL for modules must be the path to the
directory where the Berkeley DB table-files are located,
- prefixed by "db_berkeley://", e.g.,
- "db_berkeley:///usr/local/etc/openser/db_berkeley".
+ prefixed by "berkeley://", e.g.,
+ "berkeley:///usr/local/etc/openser/db_berkeley".
A couple other IMPORTANT things to consider are the 'db_mode'
and the 'use_domain' modparams. The description of these
diff --git a/modules/db_berkeley/km_db_berkeley.c b/modules/db_berkeley/km_db_berkeley.c
index 74fea05..7c69751 100644
--- a/modules/db_berkeley/km_db_berkeley.c
+++ b/modules/db_berkeley/km_db_berkeley.c
@@ -47,7 +47,7 @@
#define CFG_DIR "/tmp"
#endif
-#define BDB_ID "db_berkeley://"
+#define BDB_ID "berkeley://"
#define BDB_ID_LEN (sizeof(BDB_ID)-1)
#define BDB_PATH_LEN 256
diff --git a/modules/db_berkeley/km_doc/db_berkeley_user.sgml b/modules/db_berkeley/km_doc/db_berkeley_user.sgml
index c08222f..b2bd6e3 100644
--- a/modules/db_berkeley/km_doc/db_berkeley_user.sgml
+++ b/modules/db_berkeley/km_doc/db_berkeley_user.sgml
@@ -253,8 +253,8 @@ modparam("db_berkeley", "journal_roll_interval", 3600)
<para>
Modify the OpenSER configuration file to use db_berkeley module.
The database URL for modules must be the path to the directory where
- the Berkeley DB table-files are located, prefixed by "db_berkeley://",
- e.g., "db_berkeley:///usr/local/etc/openser/db_berkeley".
+ the Berkeley DB table-files are located, prefixed by "berkeley://",
+ e.g., "berkeley:///usr/local/etc/openser/db_berkeley".
</para>
<para>
Module: sip-router
Branch: janakj/bdb
Commit: 873c8d310fb3769aa343788c9a5fbbc7b05df5ed
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=873c8d3…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Fri Feb 8 14:32:23 2008 +0000
- port db_text and db_berkeley to the new core DB API
- remove free_* methods that are not needed anymore
- adjust structure to the other SQL based modules
- basic queries works, but otherwise not that much tested
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3668 689a6050-402a-0410-94f2-e92a70836424
---
modules/db_berkeley/km_bdb_res.c | 426 ++++++++--------------------------
modules/db_berkeley/km_bdb_res.h | 5 -
modules/db_berkeley/km_bdb_val.c | 2 +
modules/db_berkeley/km_db_berkeley.c | 10 +-
4 files changed, 107 insertions(+), 336 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=873…
Module: sip-router
Branch: janakj/bdb
Commit: 56177cc155a42959aadbcbf720fb88ac289905b0
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=56177cc…
Author: Will Quan <wiquan(a)employees.org>
Committer: Will Quan <wiquan(a)employees.org>
Date: Wed Nov 7 17:32:35 2007 +0000
Add function bdb_time2str
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3049 689a6050-402a-0410-94f2-e92a70836424
---
modules/db_berkeley/km_bdb_val.c | 43 +++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/modules/db_berkeley/km_bdb_val.c b/modules/db_berkeley/km_bdb_val.c
index b030ec6..c1330c9 100644
--- a/modules/db_berkeley/km_bdb_val.c
+++ b/modules/db_berkeley/km_bdb_val.c
@@ -35,6 +35,47 @@
#include "bdb_val.h"
#include <string.h>
+/**
+ * A copy of db_ut::db_time2str EXCEPT does not wrap the date in single-quotes
+ *
+ * Convert a time_t value to string (w.o single-quote)
+ * \param _v source value
+ * \param _s target string
+ * \param _l available length and target length
+ * \return -1 on error, 0 on success
+ * \todo This functions add quotes to the time value. This
+ * should be done in the val2str function, as some databases
+ * like db_berkeley don't need or like this at all.
+ */
+inline int bdb_time2str(time_t _v, char* _s, int* _l)
+{
+ struct tm* t;
+ int l;
+
+ if ((!_s) || (!_l) || (*_l < 2)) {
+ LM_ERR("Invalid parameter value\n");
+ return -1;
+ }
+
+// *_s++ = '\'';
+
+ /* Convert time_t structure to format accepted by the database */
+ t = localtime(&_v);
+ l = strftime(_s, *_l -1, "%Y-%m-%d %H:%M:%S", t);
+
+ if (l == 0) {
+ LM_ERR("Error during time conversion\n");
+ /* the value of _s is now unspecified */
+ _s = NULL;
+ _l = 0;
+ return -1;
+ }
+ *_l = l;
+
+// *(_s + l) = '\'';
+// *_l = l + 2;
+ return 0;
+}
/**
* Does not copy strings
@@ -207,7 +248,7 @@ int bdb_val2str(db_val_t* _v, char* _s, int* _len)
break;
case DB_DATETIME:
- if (db_time2str(VAL_TIME(_v), _s, _len) < 0) {
+ if (bdb_time2str(VAL_TIME(_v), _s, _len) < 0) {
LM_ERR("Error while converting time_t to string\n");
return -6;
} else {