Module: sip-router
Branch: 3.2
Commit: b7787ed1ae6fdee66ec24285de3c841349406a97
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b7787ed…
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
(cherry picked from commit 00193f5e1f0e9e12b55c50d33eaf6f3d32e8bb92)
---
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: 3.2
Commit: 6e0030828faccceaaa1238e2f4c83d97287a4492
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6e00308…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Jun 25 10:36:31 2012 +0200
dispatcher(k): allow set id 0 for OPTIONS callback
- set id is provided in param pointer address, 0 being equivalent to
NULL
- reported by Avi Brender
(cherry picked from commit 2664cb9aa8ffd5d26ef6a0841318ccbcdefbf69b)
---
modules_k/dispatcher/dispatch.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules_k/dispatcher/dispatch.c b/modules_k/dispatcher/dispatch.c
index e338eb6..0b1856d 100644
--- a/modules_k/dispatcher/dispatch.c
+++ b/modules_k/dispatcher/dispatch.c
@@ -2322,9 +2322,9 @@ static void ds_options_callback( struct cell *t, int type,
sip_msg_t *fmsg;
int state;
- /* The Param does contain the group, in which the failed host
+ /* The param contains the group, in which the failed host
* can be found.*/
- if (!*ps->param)
+ if (ps->param==NULL)
{
LM_DBG("No parameter provided, OPTIONS-Request was finished"
" with code %d\n", ps->code);
Module: sip-router
Branch: 3.2
Commit: 0d3f45636a075301b0809566f00a523ddf68cf52
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0d3f456…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Jul 18 19:00:38 2012 +0200
tls: set function to return the id
- starting with v1.0.0 openssl does not use anymore getpid(), but address
of errno which can point to same virtual address in a multi-process
application
- for refrence http://www.openssl.org/docs/crypto/threads.html
- credits to Jijo on sr-dev mailing list
(cherry picked from commit 0615826fe602c5183fbc7be7c51de5eb5eb7223c)
---
modules/tls/tls_locking.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/tls/tls_locking.c b/modules/tls/tls_locking.c
index 86bda17..d85b14c 100644
--- a/modules/tls/tls_locking.c
+++ b/modules/tls/tls_locking.c
@@ -130,6 +130,10 @@ void tls_destroy_locks()
}
+unsigned long sr_ssl_id_f()
+{
+ return my_pid();
+}
/* returns -1 on error, 0 on success */
int tls_init_locks()
@@ -163,10 +167,13 @@ int tls_init_locks()
CRYPTO_set_dynlock_lock_callback(dyn_lock_f);
CRYPTO_set_dynlock_destroy_callback(dyn_destroy_f);
- /* thread id callback: not needed because ser doesn't use thread and
- * openssl already uses getpid() (by default)
- * CRYPTO_set_id_callback(id_f);
+ /* starting with v1.0.0 openssl does not use anymore getpid(), but address
+ * of errno which can point to same virtual address in a multi-process
+ * application
+ * - for refrence http://www.openssl.org/docs/crypto/threads.html
*/
+ CRYPTO_set_id_callback(sr_ssl_id_f);
+
/* atomic add -- since for now we don't have atomic_add
* (only atomic_inc), fallback to the default use-locks mode
* CRYPTO_set_add_lock_callback(atomic_add_f);