Module: sip-router
Branch: janakj/bdb
Commit: 8165ad3b7064ab336b5af18c052fa20fb4ea7b76
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8165ad3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Mar 10 11:17:28 2008 +0000
- content of faq removed (mistakenly added by me after Henning did the cleanup for modules' docs; rev 3839)
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3901 689a6050-402a-0410-94f2-e92a70836424
---
modules/db_berkeley/README | 39 ---------------------------------------
1 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/modules/db_berkeley/README b/modules/db_berkeley/README
index 48fe320..076082c 100644
--- a/modules/db_berkeley/README
+++ b/modules/db_berkeley/README
@@ -45,8 +45,6 @@ Will Quan
1.13. DB Recovery : bdb_recover
1.14. Known Limitations
- 2. Frequently Asked Questions
-
List of Examples
1.1. Set auto_reload parameter
@@ -481,40 +479,3 @@ possible
sequence) mechanism. Consequently, this version does not
support surragate keys in dbschema. These are the id columns in
the tables.
-
-Chapter 2. Frequently Asked Questions
-
- Revision History
- Revision $Revision: 2 $ $Date: 2005-06-13 19:47:24 +0300 (Mon,
- 13 Jun 2005) $
-
- 2.1.
-
- Where can I find more about OpenSER?
-
- Take a look at http://openser.org/.
-
- 2.2.
-
- Where can I post a question about this module?
-
- First at all check if your question was already answered on one
- of our mailing lists:
- * User Mailing List -
- http://openser.org/cgi-bin/mailman/listinfo/users
- * Developer Mailing List -
- http://openser.org/cgi-bin/mailman/listinfo/devel
-
- E-mails regarding any stable OpenSER release should be sent to
- <users(a)openser.org> and e-mails regarding development versions
- should be sent to <devel(a)openser.org>.
-
- If you want to keep the mail private, send it to
- <team(a)openser.org>.
-
- 2.3.
-
- How can I report a bug?
-
- Please follow the guidelines provided at:
- http://sourceforge.net/tracker/?group_id=139143.
Module: sip-router
Branch: janakj/bdb
Commit: 326fba488a0ea9a6f4f5ca7f1a6a2cccb127bf1e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=326fba4…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Thu Oct 4 11:15:01 2007 +0000
- import berkeley database module into trunk
- Many thanks to William Quan from Cisco Systems for the contribution
- based on patch #1803180, renamed from berkely_db to db_berkeley
- Some work still remains:
- build berkley_db as own debian package
- add berkley_db to the xml database creation process to generate the
content in scripts/db_berkley/openser like the dbtext stuff
- evaluate if its possible to use the db_free_row and db_free_rows
functions for this module
- port to new logging system
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@2844 689a6050-402a-0410-94f2-e92a70836424
---
Module: sip-router
Branch: janakj/bdb
Commit: c8928bf3a707be39b59176ec64dcd7a3951c1f10
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c8928bf…
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/bdb_val.c | 43 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/modules/db_berkeley/bdb_val.c b/modules/db_berkeley/bdb_val.c
index b030ec6..c1330c9 100644
--- a/modules/db_berkeley/bdb_val.c
+++ b/modules/db_berkeley/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 {