Module: sip-router Branch: 3.1 Commit: ec3f4706b500771aef14e49d1a9ea3a2cdef2be1 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ec3f4706...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Juha Heinanen jh@tutpro.com Date: Thu May 26 07:09:14 2011 +0200
htable: adjust item array size
- it was 1 too much, reported by Juha Heinanen (cherry picked from commit 6987c52c42e8df6a08d54e155ee868b8b9eb523b)
---
modules_k/htable/ht_db.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules_k/htable/ht_db.c b/modules_k/htable/ht_db.c index 729bed3..1c6b566 100644 --- a/modules_k/htable/ht_db.c +++ b/modules_k/htable/ht_db.c @@ -201,7 +201,7 @@ int ht_db_load_table(ht_t *ht, str *dbtable, int mode) ht_array_size_suffix.s); hname.s = ht_name_buf; hname.len = strlen(ht_name_buf); - val.n = n+1; + val.n = n;
if(ht_set_cell(ht, &hname, 0, &val, mode)) { @@ -262,7 +262,7 @@ int ht_db_load_table(ht_t *ht, str *dbtable, int mode) ht_array_size_suffix.s); hname.s = ht_name_buf; hname.len = strlen(ht_name_buf); - val.n = n+1; + val.n = n; if(ht_set_cell(ht, &hname, 0, &val, mode)) { LM_ERR("error adding array size to hash table.\n");