Module: sip-router
Branch: master
Commit: af8230b1ac6a88dfb10d567e784a3c39a8f1b863
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=af8230b…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Sep 11 13:09:22 2012 +0100
modules_k/rls: Improved check for expired subscriptions in DB only mode
---
modules_k/rls/rls_db.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules_k/rls/rls_db.c b/modules_k/rls/rls_db.c
index 175c355..4ceeba7 100644
--- a/modules_k/rls/rls_db.c
+++ b/modules_k/rls/rls_db.c
@@ -116,7 +116,7 @@ int delete_expired_subs_rlsdb( void )
{
db_key_t query_cols[3], result_cols[3], update_cols[1];
db_val_t query_vals[3], update_vals[1], *values;
- db_op_t query_ops[1];
+ db_op_t query_ops[2];
db_row_t *rows;
db1_res_t *result = NULL;
int n_query_cols = 0, n_result_cols = 0;
@@ -145,6 +145,13 @@ int delete_expired_subs_rlsdb( 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;