소스 검색

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
Peter Dunkley 13 년 전
부모
커밋
7339273c4e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      modules_k/pua/pua_db.c

+ 2 - 2
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;