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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Thu May 26 07:09:14 2011 +0200

htable: adjust item array size

- it was 1 too much, reported by Juha Heinanen

---

 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 45a11d1..66402fe 100644
--- a/modules_k/htable/ht_db.c
+++ b/modules_k/htable/ht_db.c
@@ -217,7 +217,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))
                                        {
@@ -278,7 +278,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");


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to