Module: sip-router
Branch: 3.3
Commit: 42a123c416d5906bfefd7eaae8ef81cacda80a41
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=42a123c…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Sep 11 12:56:52 2012 +0100
modules_k/presence: Improved check for expired dialogs in DB only mode with notifier
tasks
(cherry picked from commit d9087dbbf411f71486a4ce765aa5d6dfeb531f9c)
---
modules_k/presence/subscribe.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules_k/presence/subscribe.c b/modules_k/presence/subscribe.c
index deeef3e..7e90cce 100644
--- a/modules_k/presence/subscribe.c
+++ b/modules_k/presence/subscribe.c
@@ -1581,9 +1581,9 @@ int handle_expired_subs(subs_t* s)
void update_db_subs_timer_notifier(void)
{
- db_key_t query_cols[1], result_cols[3];
- db_val_t query_vals[1], *values;
- db_op_t query_ops[1];
+ db_key_t query_cols[2], result_cols[3];
+ db_val_t query_vals[2], *values;
+ db_op_t query_ops[2];
db_row_t *rows;
db1_res_t *result = NULL;
int n_query_cols = 0, n_result_cols = 0;
@@ -1610,6 +1610,13 @@ void update_db_subs_timer_notifier(void)
query_ops[n_query_cols]= OP_LT;
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;
+ query_ops[n_query_cols]= OP_EQ;
+ n_query_cols++;
+
result_cols[r_callid_col=n_result_cols++] = &str_callid_col;
result_cols[r_to_tag_col=n_result_cols++] = &str_to_tag_col;
result_cols[r_from_tag_col=n_result_cols++] = &str_from_tag_col;