Hello,
looking at changes in the database structure from 3.2 to 3.3, I noticed
the columns in active_watchers/rls_watches that have no default value
and cannot be NULL.
The usual issue with this kind of upgrades is that existing rows have to
be removed. active_watchers is with temporary records, and I guess that
is the same with rls_watchers. No persistent data is to be lost, right?
Another one is extra_hdrs in silo table. I think it should be allowed to
be NULL or default '' (empty string), so stored messages will not be
lost - the check over the code showed inserting '' if no extra headers
are present at message storage time.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Hello,
currently I am looking for an option to evaluate a string with
pseudo-variables at script runtime.
For example when reading the following string (in script) from database
"from is $fu and to-uri-user is $(tu{uri.user}) and cl is $cl"
into a pseudo-variable $var(tmp)
I want kamailio to parse the _content_ of $var(tmp): replace the
"inside"-pvs with their values and perform transformations.
Is there a function exported to script, that could do that?
(Background: I would like to make the lcr-module a bit more flexible:
read "template"-string for fromuri, touri, ruri from database instead of
ruri-strip, ruri-prefix etc.)
Kind Regards
Jasmin
Module: sip-router
Branch: master
Commit: 765a538aa9d5e2d56cf980ad6adab17d0a1fbc73
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=765a538…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed May 2 17:43:14 2012 +0100
modules/db_postgres: Retries are disabled within transactions
- You don't want automatic retries in the database when inside a
transaction (that is after an SQL BEGIN). This is because if the
database connection fails the outstanding operations will be rolled
back. If you automatically connect and retry the failed operation
it will be acting on a database table/rows that are in a different
state from which it expects.
- This change disables retries on any SQL operations between a
start_transaction and an (end|abort)_transaction.
- Other database operations are unaffected.
---
modules/db_postgres/km_dbase.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/db_postgres/km_dbase.c b/modules/db_postgres/km_dbase.c
index b1ac34b..d2be696 100644
--- a/modules/db_postgres/km_dbase.c
+++ b/modules/db_postgres/km_dbase.c
@@ -163,7 +163,7 @@ void db_postgres_close(db1_con_t* _h)
*/
static int db_postgres_submit_query(const db1_con_t* _con, const str* _s)
{
- int i;
+ int i, retries;
ExecStatusType pqresult;
if(! _con || !_s || !_s->s)
@@ -194,7 +194,12 @@ static int db_postgres_submit_query(const db1_con_t* _con, const str* _s)
return -1;
}
- for(i = 0; i <= pg_retries; i++) {
+ if (CON_TRANSACTION(_con) == 1)
+ retries = 0;
+ else
+ retries = pg_retries;
+
+ for(i = 0; i <= retries; i++) {
/* free any previous query that is laying about */
db_postgres_free_query(_con);
/* exec the query */