Module: sip-router
Branch: master
Commit: b3568cf5613890d71560a40444bc16ab78a65954
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b3568cf…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Apr 2 11:47:23 2012 +0100
modules_k/pua: Fixed CSeq double increment bug
- This was added during the recent PUA DB only mode performance
improvements.
- This bug doesn't really do any harm as things work as long as the
CSeq is going up - but it wasn't right.
---
modules_k/pua/hash.c | 5 +----
modules_k/pua/pua_db.c | 8 ++++----
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/modules_k/pua/hash.c b/modules_k/pua/hash.c
index 9bb3619..fe6d82b 100644
--- a/modules_k/pua/hash.c
+++ b/modules_k/pua/hash.c
@@ -260,9 +260,6 @@ void insert_htable(ua_pres_t* presentity)
hash_code= core_hash(presentity->pres_uri,presentity->watcher_uri, HASH_SIZE);
lock_get(&HashT->p_records[hash_code].lock);
- if (presentity->watcher_uri)
- presentity->cseq++;
-
_insert_htable(presentity, hash_code);
lock_release(&HashT->p_records[hash_code].lock);
@@ -698,4 +695,4 @@ list_entry_t *get_subs_list(str *did)
}
done:
return list;
-}
+}
\ No newline at end of file
diff --git a/modules_k/pua/pua_db.c b/modules_k/pua/pua_db.c
index 4209918..c9846d0 100644
--- a/modules_k/pua/pua_db.c
+++ b/modules_k/pua/pua_db.c
@@ -525,7 +525,7 @@ int convert_temporary_dialog_puadb(ua_pres_t *pres)
query_cols[n_query_cols] = &str_cseq_col;
query_vals[n_query_cols].type = DB1_INT;
query_vals[n_query_cols].nul = 0;
- query_vals[n_query_cols].val.int_val = pres->cseq + 1;
+ query_vals[n_query_cols].val.int_val = pres->cseq;
n_query_cols++;
query_cols[n_query_cols] = &str_record_route_col;
@@ -1092,7 +1092,7 @@ int insert_dialog_puadb(ua_pres_t* pres)
db_cols[n_cols] = &str_cseq_col;
db_vals[n_cols].type = DB1_INT;
db_vals[n_cols].nul = 0;
- db_vals[n_cols].val.int_val = pres->cseq + 1;
+ db_vals[n_cols].val.int_val = pres->cseq;
n_cols++;
db_cols[n_cols] = &str_record_route_col;
@@ -1333,7 +1333,7 @@ int update_dialog_puadb(ua_pres_t *pres, int expires, str *contact)
u_cols[n_update_cols] = &str_cseq_col;
u_vals[n_update_cols].type = DB1_INT;
u_vals[n_update_cols].nul = 0;
- u_vals[n_update_cols].val.int_val = pres->cseq + 1;
+ u_vals[n_update_cols].val.int_val = pres->cseq;
n_update_cols++;
u_cols[n_update_cols] = &str_remote_contact_col;
@@ -1566,4 +1566,4 @@ list_entry_t *get_subs_list_puadb(str *did)
&& (RES_ROWS(res)>0));
return list;
-}
+}
\ No newline at end of file