Module: sip-router
Branch: master
Commit: 7339273c4e96908408aedc4c3c1be6bd2815fe8a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7339273…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Mar 30 17:17:06 2012 +0100
modules_k/pua: Fixed bugs with expiry value in update_(dialog|record)_puadb()
- I forgot to add (int) time(NULL) to the expiry value before updating the DB
---
modules_k/pua/pua_db.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules_k/pua/pua_db.c b/modules_k/pua/pua_db.c
index 6a5d0d8..4209918 100644
--- a/modules_k/pua/pua_db.c
+++ b/modules_k/pua/pua_db.c
@@ -950,7 +950,7 @@ int update_record_puadb(ua_pres_t *pres, int expires, str *etag)
u_cols[n_update_cols] = &str_expires_col;
u_vals[n_update_cols].type = DB1_INT;
u_vals[n_update_cols].nul = 0;
- u_vals[n_update_cols].val.int_val = expires;
+ u_vals[n_update_cols].val.int_val = expires + (int) time(NULL);
n_update_cols++;
if (etag)
@@ -1327,7 +1327,7 @@ int update_dialog_puadb(ua_pres_t *pres, int expires, str *contact)
u_cols[n_update_cols] = &str_expires_col;
u_vals[n_update_cols].type = DB1_INT;
u_vals[n_update_cols].nul = 0;
- u_vals[n_update_cols].val.int_val = expires;
+ u_vals[n_update_cols].val.int_val = expires + (int) time(NULL);
n_update_cols++;
u_cols[n_update_cols] = &str_cseq_col;