Module: sip-router
Branch: master
Commit: d9087dbbf411f71486a4ce765aa5d6dfeb531f9c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d9087db…
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
---
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 e98ef35..2a17a57 100644
--- a/modules_k/presence/subscribe.c
+++ b/modules_k/presence/subscribe.c
@@ -1620,9 +1620,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;
@@ -1649,6 +1649,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;