[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-devel
Subject:    [sr-dev] git:master: modules_k/pua: Fixed bugs with expiry value in update_( dialog|record)_puadb()
From:       Peter Dunkley <peter.dunkley () crocodile-rcs ! com>
Date:       2012-03-30 16:18:19
Message-ID: 20120330161820.6F971EF804D () rimmer ! ryngle ! com
[Download RAW message or body]

Module: sip-router
Branch: master
Commit: 7339273c4e96908408aedc4c3c1be6bd2815fe8a
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7339273c4e96908408aedc4c3c1be6bd2815fe8a


Author: Peter Dunkley <peter.dunkley@crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley@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;


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic