Module: sip-router
Branch: 3.3
Commit: e9ccba247a1262c7b183fb66933d5ee06b765968
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e9ccba2…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Sep 16 23:46:07 2012 +0100
modules_k/rls: Fixed race-condition on multi-server systems that can cause different
NOTIFYs with the same CSeq
- Found by Hugh Waite @ Crocodile RCS and fixed by Peter Dunkley @ Crocodile RCS
(cherry picked from commit 67df57c984e040a948d01d2c6bf1a9461d271f8e)
---
modules_k/rls/rls_db.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules_k/rls/rls_db.c b/modules_k/rls/rls_db.c
index 0e72991..09140c7 100644
--- a/modules_k/rls/rls_db.c
+++ b/modules_k/rls/rls_db.c
@@ -856,8 +856,8 @@ int get_dialog_subscribe_rlsdb(subs_t *subs)
subs_t *get_dialog_notify_rlsdb(str callid, str to_tag, str from_tag)
{
- db_key_t query_cols[3];
- db_val_t query_vals[3];
+ db_key_t query_cols[4];
+ db_val_t query_vals[4];
db_key_t result_cols[22];
int n_query_cols = 0, n_result_cols=0;
int r_pres_uri_col,r_to_user_col,r_to_domain_col;
@@ -905,6 +905,12 @@ subs_t *get_dialog_notify_rlsdb(str callid, str to_tag, str
from_tag)
query_vals[n_query_cols].nul = 0;
query_vals[n_query_cols].val.str_val= from_tag;
n_query_cols++;
+
+ query_cols[n_query_cols] = &str_updated_col;
+ query_vals[n_query_cols].type = DB1_INT;
+ query_vals[n_query_cols].nul = 0;
+ query_vals[n_query_cols].val.int_val= NO_UPDATE_TYPE;
+ n_query_cols++;
result_cols[r_pres_uri_col=n_result_cols++] = &str_presentity_uri_col;
result_cols[r_to_user_col=n_result_cols++] = &str_to_user_col;