Module: sip-router
Branch: master
Commit: bacb5704a05dafb345221095ff194a9181394b98
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bacb570…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Oct 24 23:03:59 2010 +0200
auth_db(k): note about empty realm parameter
- empty realm is no longer allowed, use $td of $fd if you have
multi-domain
---
modules_k/auth_db/README | 11 ++++++-----
modules_k/auth_db/doc/auth_db_admin.xml | 15 ++++++++++-----
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/modules_k/auth_db/README b/modules_k/auth_db/README
index dc1cccf..cb6177c 100644
--- a/modules_k/auth_db/README
+++ b/modules_k/auth_db/README
@@ -305,11 +305,10 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
* realm - Realm is a opaque string that the user agent should present
to the user so he can decide what username and password to use.
Usually this is domain of the host the server is running on.
- If an empty string “” is used then the server will generate it from
- the request. In case of REGISTER requests To header field domain
- will be used (because this header field represents a user being
- registered), for all other messages From header field domain will
- be used.
+ It must not be empty string “”. In case of REGISTER requests To
+ header field domain (e.g., variable $td) can be used (because this
+ header field represents the user being registered), for all other
+ messages From header field domain can be used (e.g., variable $fd).
The string may contain pseudo variables.
* table - Table to be used to lookup usernames and passwords (usually
subscribers table).
@@ -346,6 +345,8 @@ if (www_authorize("kamailio.org", "subscriber")) {
* realm - Realm is a opaque string that the user agent should present
to the user so he can decide what username and password to use.
Usually this is domain of the host the server is running on.
+ It must not be empty string “”. Apart of a static strinh, typical
+ value is From header field domain (e.g., variable $fd).
If an empty string “” is used then the server will generate it from
the request. From header field domain will be used as realm.
The string may contain pseudo variables.
diff --git a/modules_k/auth_db/doc/auth_db_admin.xml b/modules_k/auth_db/doc/auth_db_admin.xml
index b6e1d14..f00e5ca 100644
--- a/modules_k/auth_db/doc/auth_db_admin.xml
+++ b/modules_k/auth_db/doc/auth_db_admin.xml
@@ -324,11 +324,11 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address")
the server is running on.
</para>
<para>
- If an empty string <quote></quote> is used then the server will
- generate it from the request. In case of REGISTER requests To
- header field domain will be used (because this header field
- represents a user being registered), for all other messages From
- header field domain will be used.
+ It must not be empty string <quote></quote>. In case of REGISTER
+ requests To header field domain (e.g., variable $td) can be used
+ (because this header field represents the user being registered),
+ for all other messages From header field domain can be used
+ (e.g., variable $fd).
</para>
<para>
The string may contain pseudo variables.
@@ -395,6 +395,11 @@ if (www_authorize("kamailio.org", "subscriber")) {
the server is running on.
</para>
<para>
+ It must not be empty string <quote></quote>. Apart of a static
+ strinh, typical value is From header field domain
+ (e.g., variable $fd).
+ </para>
+ <para>
If an empty string <quote></quote> is used then the server will
generate it from the request. From header field domain will be
used as realm.
Module: sip-router
Branch: 3.1
Commit: 292bab78715749066db5693b22b490fcbcfa4e4a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=292bab7…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Oct 20 18:38:11 2010 +0200
tm: fix possible uninit. use of cancel_reason
In some cases an uninitialized cancel_reason structure was used
(e.g. fake_reply() and relay_reply() failing).
Reported-by: Alex Balashov abalashov evaristesys com
(cherry picked from commit 7faa58b0264cb77c991a21bd3b7e3d660596ad85)
---
modules/tm/t_cancel.c | 1 +
modules/tm/t_reply.c | 11 +++++++++++
modules/tm/timer.c | 1 +
3 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/modules/tm/t_cancel.c b/modules/tm/t_cancel.c
index 277c415..c1b52be 100644
--- a/modules/tm/t_cancel.c
+++ b/modules/tm/t_cancel.c
@@ -225,6 +225,7 @@ int cancel_branch( struct cell *t, int branch,
irb=&t->uac[branch].request;
irb->flags|=F_RB_CANCELED;
ret=1;
+ init_cancel_info(&tmp_cd);
# ifdef EXTRA_DEBUG
if (crb->buffer!=BUSY_BUFFER) {
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index fcf214d..382244f 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -1096,8 +1096,11 @@ static unsigned char drop_replies;
* Checks if the new reply (with new_code status) should be sent or not
* based on the current
* transaction status.
+ *
+ * @param cancel_data - initialized cancel_info structure.
* Returns - branch number (0,1,...) which should be relayed
* -1 if nothing to be relayed
+ * WARNING: cancel_data should be initialized prior to calling this function.
*/
static enum rps t_should_relay_response( struct cell *Trans , int new_code,
int branch , int *should_store, int *should_relay,
@@ -1576,6 +1579,10 @@ skip:
REPLY_LOCK and it returns unlocked!
If do_put_on_wait==1 and this is the final reply, the transaction
wait timer will be started (put_on_wait(t)).
+ *
+ * @param cancel_data - initialized cancel_info structure.
+ *
+ * WARNING: cancel_data should be initialized prior to calling this function.
*/
enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch,
unsigned int msg_status, struct cancel_info *cancel_data,
@@ -1851,6 +1858,10 @@ error01:
/* this is the "UAC" above transaction layer; if a final reply
is received, it triggers a callback; note well -- it assumes
it is entered locked with REPLY_LOCK and it returns unlocked!
+ *
+ * @param cancel_data - initialized cancel_info structure.
+ *
+ * WARNING: cancel_data should be initialized prior to calling this function.
*/
enum rps local_reply( struct cell *t, struct sip_msg *p_msg, int branch,
unsigned int msg_status, struct cancel_info *cancel_data)
diff --git a/modules/tm/timer.c b/modules/tm/timer.c
index a961675..a31a59c 100644
--- a/modules/tm/timer.c
+++ b/modules/tm/timer.c
@@ -303,6 +303,7 @@ static void fake_reply(struct cell *t, int branch, int code )
short do_cancel_branch;
enum rps reply_status;
+ init_cancel_info(&cancel_data);
do_cancel_branch = is_invite(t) && prepare_cancel_branch(t, branch, 0);
/* mark branch as canceled */
t->uac[branch].request.flags|=F_RB_CANCELED;
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Robert Verspuy (exarv)
Attached to Project - sip-router
Summary - pooling of libsrdb1 doesnt restrict database connection to 1 thread and gives issues with postgresql
Task Type - Bug Report
Category - libsrdb1 (kamailio)
Status - Assigned
Assigned To - Henning Westerholt
Operating System - Linux
Severity - High
Priority - Normal
Reported Version - 3.1
Due in Version - Undecided
Due Date - Undecided
Details - In the source lib/srdb1/* some kind of pooling is used.
When kamailio needs a database connection, the cmp_db_id function checks to see if there is already a database connection with the exact same params (username, database, server etc..).
According to the PQ library every proces / thread should have it's own database connection.
The db_postgres is setup to use asynchronous I/O with the PQ library.
So when two threads are using the same database connection it is possible that,
the resultset from a query of thread A is returned to thread B.
The cmp_db_id function in lib/srdb1/db_id.c does _not_ check the PID.
I've created a small patch to fix the problems mentioned above.
The changes are made in lib/srdb1/* files
So if you apply them, it will be active for _every_ database module.
Maybe it's not needed for the mysql database,
but I *assume* it will not break when used on a mysql database. (not tested)
Maybe you will get a bit more database connections, but that depends on
which modules you're using.
What did I do:
* Added pid to the db_id struct.
* During initialization the pid is saved into the db_id struct.
* In cmp_db_id the pid is also checked when searching for a database
connection to be reused.
See complete thread on http://lists.sip-router.org/pipermail/sr-dev/2010-October/009689.html
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=97
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#97 - pooling of libsrdb1 doesnt restrict database connection to 1 thread and gives issues with postgresql
User who did this - Robert Verspuy (exarv)
http://sip-router.org/tracker/index.php?do=details&task_id=97
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.