Module: sip-router
Branch: master
Commit: 00193f5e1f0e9e12b55c50d33eaf6f3d32e8bb92
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=00193f5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Apr 20 15:35:49 2012 +0200
tm: reset T if t_continue() resumes a canceled transaction
- when the suspended transaction was already canceled, and t_continue
was executed before transaction was destroyed, global variable T was
left set, causing an extra unref by post script callback
---
modules/tm/t_suspend.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c
index e6e2e35..35adcb1 100644
--- a/modules/tm/t_suspend.c
+++ b/modules/tm/t_suspend.c
@@ -133,6 +133,8 @@ int t_continue(unsigned int hash_index, unsigned int label,
/* The transaction has already been canceled,
* needless to continue */
UNREF(t); /* t_unref would kill the transaction */
+ /* reset T as we have no working T anymore */
+ set_t(T_UNDEFINED, T_BR_UNDEFINED);
return 1;
}
Module: sip-router
Branch: master
Commit: dff68160e4decc43f2da8948ea03bc4d469ded96
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dff6816…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Apr 18 17:29:32 2012 +0100
modules_k/rls: RLS full-state NOTIFY requests now sent by notifier process(es)
- Also modified the notifier process stuff to only work when in
DB only mode. This is because the full-state handling stuff
in the notifier processes relies on DB only mode.
- Leaving the full-state stuff outside of the notifier process
didn't work because there was a row update race between the
notifier process and non-notifier process when full-state and non-
full-state NOTIFY requests were generated at the same time.
- This ensures that (with default options) you get at most one NOTIFY
(or set of NOTIFYs when splitting large NOTIFYs is enabled) per
5s per watcher from RLS.
- It also helps spread out the NOTIFY generation load more evenly
across time.
---
modules_k/rls/README | 6 ++
modules_k/rls/doc/rls_admin.xml | 8 ++
modules_k/rls/resource_notify.c | 175 +++++++++++++++++++++++++++++++++++++--
modules_k/rls/rls.c | 25 ++++--
modules_k/rls/rls.h | 3 +
modules_k/rls/rls_db.c | 20 ++++-
modules_k/rls/subscribe.c | 40 ++++++----
7 files changed, 240 insertions(+), 37 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=dff…
Module: sip-router
Branch: master
Commit: 5da9a4e773d2c3c625a870dd4639408d99676d69
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5da9a4e…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Apr 20 13:56:37 2012 +0100
lib/srdb1: Added db_begin()/db_commit()/db_rollback() wrapper functions
- These are helper functions to enable blocks of DB queries/updates in
modules to be handled as a single transaction.
- These functions wrap db_raw_query() and only perform the BEGIN/COMMIT/
ROLLBACK when the db module supports raw_query().
---
lib/srdb1/db.h | 17 ++++++++++++
lib/srdb1/db_query.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+), 0 deletions(-)
diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
index 6d3a45d..5258e2c 100644
--- a/lib/srdb1/db.h
+++ b/lib/srdb1/db.h
@@ -473,5 +473,22 @@ int db_fetch_query(db_func_t *dbf, int frows,
int db_fetch_next(db_func_t *dbf, int frows, db1_con_t* _h,
db1_res_t** _r);
+/**
+ * \brief wrapper around db raw_query to perform BEGIN
+ * \return -1 error; 0 OK with no raw_query capability; 1 OK with raw_query capability
+ */
+int db_begin(db_func_t *dbf, db1_con_t* _h);
+
+/**
+ * \brief wrapper around db raw_query to perform COMMIT
+ * \return -1 error; 0 OK with no raw_query capability; 1 OK with raw_query capability
+ */
+int db_commit(db_func_t *dbf, db1_con_t* _h);
+
+/**
+ * \wrapper around db raw_query to perform ROLLBACK
+ * \return -1 error; 0 OK with no raw_query capability; 1 OK with raw_query capability
+ */
+int db_rollback(db_func_t *dbf, db1_con_t* _h);
#endif /* DB1_H */
diff --git a/lib/srdb1/db_query.c b/lib/srdb1/db_query.c
index 004d10c..1305f46 100644
--- a/lib/srdb1/db_query.c
+++ b/lib/srdb1/db_query.c
@@ -456,3 +456,72 @@ error:
}
return -1;
}
+
+/**
+ * wrapper around db raw_query to perform BEGIN
+ * return: -1 error; 0 OK with no raw_query capability; 1 OK with raw_query capability
+ */
+int db_begin(db_func_t *dbf, db1_con_t* _h)
+{
+ db1_res_t *res = NULL;
+ int ret = 0;
+ str query_str = str_init("BEGIN");
+
+ if (DB_CAPABILITY(*dbf, DB_CAP_RAW_QUERY)) {
+ if (dbf->raw_query(_h, &query_str, &res)) {
+ LM_ERR("unable to run raw query\n");
+ ret = -1;
+ goto done;
+ }
+ ret = 1;
+ }
+done:
+ if (res) dbf->free_result(_h, res);
+ return ret;
+}
+
+/**
+ * wrapper around db raw_query to perform COMMIT
+ * return: -1 error; 0 OK with no raw_query capability; 1 OK with raw_query capability
+ */
+int db_commit(db_func_t *dbf, db1_con_t* _h)
+{
+ db1_res_t *res = NULL;
+ int ret = 0;
+ str query_str = str_init("COMMIT");
+
+ if (DB_CAPABILITY(*dbf, DB_CAP_RAW_QUERY)) {
+ if (dbf->raw_query(_h, &query_str, &res)) {
+ LM_ERR("unable to run raw query\n");
+ ret = -1;
+ goto done;
+ }
+ ret = 1;
+ }
+done:
+ if (res) dbf->free_result(_h, res);
+ return ret;
+}
+
+/**
+ * wrapper around db raw_query to perform ROLLBACK
+ * return: -1 error; 0 OK with no raw_query capability; 1 OK with raw_query capability
+ */
+int db_rollback(db_func_t *dbf, db1_con_t* _h)
+{
+ db1_res_t *res = NULL;
+ int ret = 0;
+ str query_str = str_init("COMMIT");
+
+ if (DB_CAPABILITY(*dbf, DB_CAP_RAW_QUERY)) {
+ if (dbf->raw_query(_h, &query_str, &res)) {
+ LM_ERR("unable to run raw query\n");
+ ret = -1;
+ goto done;
+ }
+ ret = 1;
+ }
+done:
+ if (res) dbf->free_result(_h, res);
+ return ret;
+}
Module: sip-router
Branch: 3.2
Commit: da0eff88c7467365e9f7300960baee5aac36f27a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=da0eff8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Apr 20 09:42:39 2012 +0200
presence_xml: updates to docs to refer to embedded xcap server
(cherry picked from commit 171f560f768b43e140c24b6cc4823a92f13b2f05)
---
modules_k/presence_xml/README | 29 +++++++++++----------
modules_k/presence_xml/doc/presence_xml_admin.xml | 11 ++++---
2 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/modules_k/presence_xml/README b/modules_k/presence_xml/README
index 84b0da2..b53cc01 100644
--- a/modules_k/presence_xml/README
+++ b/modules_k/presence_xml/README
@@ -21,7 +21,7 @@ Anca-Maria Vamanu
2.1. Kamailio Modules
2.2. External Libraries or Applications
- 3. Exported Parameters
+ 3. Parameters
3.1. db_url(str)
3.2. xcap_table(str)
@@ -34,7 +34,7 @@ Anca-Maria Vamanu
3.9. xcap_server (str)
3.10. passive_mode(int)
- 4. Exported Functions
+ 4. Functions
4.1. pres_check_basic(presentity_uri, status)
4.2. pres_check_activities(presentity_uri, activity)
@@ -69,7 +69,7 @@ Chapter 1. Admin Guide
2.1. Kamailio Modules
2.2. External Libraries or Applications
- 3. Exported Parameters
+ 3. Parameters
3.1. db_url(str)
3.2. xcap_table(str)
@@ -82,7 +82,7 @@ Chapter 1. Admin Guide
3.9. xcap_server (str)
3.10. passive_mode(int)
- 4. Exported Functions
+ 4. Functions
4.1. pres_check_basic(presentity_uri, status)
4.2. pres_check_activities(presentity_uri, activity)
@@ -127,7 +127,7 @@ Chapter 1. Admin Guide
running Kamailio with this module loaded:
* libxml.
-3. Exported Parameters
+3. Parameters
3.1. db_url(str)
3.2. xcap_table(str)
@@ -236,14 +236,15 @@ modparam("presence_xml", "pidf_manipulation", 1)
3.8. integrated_xcap_server (int)
- This parameter is a flag for the type of XCAP server or servers used.
- If the XCAP server is integrated with Kamailio presence_XML module and
- access the same database tables directly, like the XCAP-lite server
- from AG Projects, the parameter should be set to a positive value.
- Apart from updating in xcap table, the integrated server must send an
- MI command refershWatchers [pres_uri] [event] when a user modifies a
- rules document, to instruct the presence_xml module to update states
- from the database and, if needed, send NOTIFY updates.
+ This parameter is a flag for the type of XCAP servers used. If the XCAP
+ server is integrated with Kamailio presence_xml module and access the
+ same database tables directly, like the embedded XCAP server
+ implemented in xcap_server module, the parameter should be set to a
+ positive value. Apart from updating in xcap table, if the integrated
+ server is not running on the same Kamailio instance, it must send an MI
+ command refershWatchers [pres_uri] [event] when a user modifies a rules
+ document, to instruct the presence_xml module to update states from the
+ database and, if needed, send NOTIFY updates.
Otherwise, it uses xcap_client module to fetch documents from the XCAP
servers with HTTP requests. This mode is currently not supported.
@@ -281,7 +282,7 @@ modparam("presence_xml", "xcap_server", "xcap_server.ag.org")
modparam("presence_xml", "passive_mode", 1)
...
-4. Exported Functions
+4. Functions
4.1. pres_check_basic(presentity_uri, status)
4.2. pres_check_activities(presentity_uri, activity)
diff --git a/modules_k/presence_xml/doc/presence_xml_admin.xml b/modules_k/presence_xml/doc/presence_xml_admin.xml
index b7832a9..ffab8b9 100644
--- a/modules_k/presence_xml/doc/presence_xml_admin.xml
+++ b/modules_k/presence_xml/doc/presence_xml_admin.xml
@@ -246,12 +246,13 @@ modparam("presence_xml", "pidf_manipulation", 1)
<section>
<title><varname>integrated_xcap_server</varname> (int)</title>
<para>
- This parameter is a flag for the type of XCAP server or servers
- used. If the XCAP server is integrated with &kamailio; presence_XML
- module and access the same database tables directly, like the XCAP-lite
- server from AG Projects, the parameter should be
+ This parameter is a flag for the type of XCAP servers
+ used. If the XCAP server is integrated with &kamailio; presence_xml
+ module and access the same database tables directly, like the embedded
+ XCAP server implemented in xcap_server module, the parameter should be
set to a positive value. Apart from updating in xcap table,
- the integrated server must send an MI command refershWatchers
+ if the integrated server is not running on the same &kamailio; instance,
+ it must send an MI command refershWatchers
[pres_uri] [event] when a user modifies a rules document, to
instruct the presence_xml module to update states from the database
and, if needed, send NOTIFY updates.
Module: sip-router
Branch: master
Commit: 171f560f768b43e140c24b6cc4823a92f13b2f05
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=171f560…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Apr 20 09:42:39 2012 +0200
presence_xml: updates to docs to refer to embedded xcap server
---
modules_k/presence_xml/README | 29 +++++++++++----------
modules_k/presence_xml/doc/presence_xml_admin.xml | 11 ++++---
2 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/modules_k/presence_xml/README b/modules_k/presence_xml/README
index 84b0da2..b53cc01 100644
--- a/modules_k/presence_xml/README
+++ b/modules_k/presence_xml/README
@@ -21,7 +21,7 @@ Anca-Maria Vamanu
2.1. Kamailio Modules
2.2. External Libraries or Applications
- 3. Exported Parameters
+ 3. Parameters
3.1. db_url(str)
3.2. xcap_table(str)
@@ -34,7 +34,7 @@ Anca-Maria Vamanu
3.9. xcap_server (str)
3.10. passive_mode(int)
- 4. Exported Functions
+ 4. Functions
4.1. pres_check_basic(presentity_uri, status)
4.2. pres_check_activities(presentity_uri, activity)
@@ -69,7 +69,7 @@ Chapter 1. Admin Guide
2.1. Kamailio Modules
2.2. External Libraries or Applications
- 3. Exported Parameters
+ 3. Parameters
3.1. db_url(str)
3.2. xcap_table(str)
@@ -82,7 +82,7 @@ Chapter 1. Admin Guide
3.9. xcap_server (str)
3.10. passive_mode(int)
- 4. Exported Functions
+ 4. Functions
4.1. pres_check_basic(presentity_uri, status)
4.2. pres_check_activities(presentity_uri, activity)
@@ -127,7 +127,7 @@ Chapter 1. Admin Guide
running Kamailio with this module loaded:
* libxml.
-3. Exported Parameters
+3. Parameters
3.1. db_url(str)
3.2. xcap_table(str)
@@ -236,14 +236,15 @@ modparam("presence_xml", "pidf_manipulation", 1)
3.8. integrated_xcap_server (int)
- This parameter is a flag for the type of XCAP server or servers used.
- If the XCAP server is integrated with Kamailio presence_XML module and
- access the same database tables directly, like the XCAP-lite server
- from AG Projects, the parameter should be set to a positive value.
- Apart from updating in xcap table, the integrated server must send an
- MI command refershWatchers [pres_uri] [event] when a user modifies a
- rules document, to instruct the presence_xml module to update states
- from the database and, if needed, send NOTIFY updates.
+ This parameter is a flag for the type of XCAP servers used. If the XCAP
+ server is integrated with Kamailio presence_xml module and access the
+ same database tables directly, like the embedded XCAP server
+ implemented in xcap_server module, the parameter should be set to a
+ positive value. Apart from updating in xcap table, if the integrated
+ server is not running on the same Kamailio instance, it must send an MI
+ command refershWatchers [pres_uri] [event] when a user modifies a rules
+ document, to instruct the presence_xml module to update states from the
+ database and, if needed, send NOTIFY updates.
Otherwise, it uses xcap_client module to fetch documents from the XCAP
servers with HTTP requests. This mode is currently not supported.
@@ -281,7 +282,7 @@ modparam("presence_xml", "xcap_server", "xcap_server.ag.org")
modparam("presence_xml", "passive_mode", 1)
...
-4. Exported Functions
+4. Functions
4.1. pres_check_basic(presentity_uri, status)
4.2. pres_check_activities(presentity_uri, activity)
diff --git a/modules_k/presence_xml/doc/presence_xml_admin.xml b/modules_k/presence_xml/doc/presence_xml_admin.xml
index b7832a9..ffab8b9 100644
--- a/modules_k/presence_xml/doc/presence_xml_admin.xml
+++ b/modules_k/presence_xml/doc/presence_xml_admin.xml
@@ -246,12 +246,13 @@ modparam("presence_xml", "pidf_manipulation", 1)
<section>
<title><varname>integrated_xcap_server</varname> (int)</title>
<para>
- This parameter is a flag for the type of XCAP server or servers
- used. If the XCAP server is integrated with &kamailio; presence_XML
- module and access the same database tables directly, like the XCAP-lite
- server from AG Projects, the parameter should be
+ This parameter is a flag for the type of XCAP servers
+ used. If the XCAP server is integrated with &kamailio; presence_xml
+ module and access the same database tables directly, like the embedded
+ XCAP server implemented in xcap_server module, the parameter should be
set to a positive value. Apart from updating in xcap table,
- the integrated server must send an MI command refershWatchers
+ if the integrated server is not running on the same &kamailio; instance,
+ it must send an MI command refershWatchers
[pres_uri] [event] when a user modifies a rules document, to
instruct the presence_xml module to update states from the database
and, if needed, send NOTIFY updates.