[sr-dev] git:master:ace37c7a: htable: Add missing ht_slot_unlock in ht_cell_value_add

Jon Bergli Heier jon.bergli.heier at zisson.no
Thu May 7 11:50:01 CEST 2015


Module: kamailio
Branch: master
Commit: ace37c7a60e5d931216339c179de6e91615dac7e
URL: https://github.com/kamailio/kamailio/commit/ace37c7a60e5d931216339c179de6e91615dac7e

Author: Jon Bergli Heier <jon.bergli.heier at zisson.no>
Committer: Jon Bergli Heier <jon.bergli.heier at zisson.no>
Date: 2015-05-07T11:08:08+02:00

htable: Add missing ht_slot_unlock in ht_cell_value_add

---

Modified: modules/htable/ht_api.c

---

Diff:  https://github.com/kamailio/kamailio/commit/ace37c7a60e5d931216339c179de6e91615dac7e.diff
Patch: https://github.com/kamailio/kamailio/commit/ace37c7a60e5d931216339c179de6e91615dac7e.patch

---

diff --git a/modules/htable/ht_api.c b/modules/htable/ht_api.c
index 690f9c7..fb0b117 100644
--- a/modules/htable/ht_api.c
+++ b/modules/htable/ht_api.c
@@ -672,7 +672,10 @@ ht_cell_t* ht_cell_value_add(ht_t *ht, str *name, int val, int mode,
 	}
 	/* add val if htable has an integer init value */
 	if(ht->flags!=PV_VAL_INT)
+	{
+		if(mode) ht_slot_unlock(ht, idx);
 		return NULL;
+	}
 	isval.n = ht->initval.n + val;
 	it = ht_cell_new(name, 0, &isval, hid);
 	if(it == NULL)




More information about the sr-dev mailing list