[sr-dev] git:master: htable: set str shortcut to iterator name

Elena-Ramona Modroiu ramona at rosdev.ro
Tue Oct 28 11:43:05 CET 2014


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

Author: Elena-Ramona Modroiu <ramona at asipto.com>
Committer: Elena-Ramona Modroiu <ramona at asipto.com>
Date:   Tue Oct 28 11:41:47 2014 +0100

htable: set str shortcut to iterator name

- intended for optimization of iterator search by name

---

 modules/htable/ht_api.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/htable/ht_api.c b/modules/htable/ht_api.c
index a57af23..13d373d 100644
--- a/modules/htable/ht_api.c
+++ b/modules/htable/ht_api.c
@@ -1400,6 +1400,8 @@ int ht_iterator_start(str *iname, str *hname)
 		}
 		strncpy(_ht_iterators[k].bname, iname->s, iname->len);
 		_ht_iterators[k].bname[iname->len] = '\0';
+		_ht_iterators[k].name.len = iname->len;
+		_ht_iterators[k].name.s = _ht_iterators[k].bname;
 	}
 	_ht_iterators[k].it = NULL;
 	_ht_iterators[k].slot = 0;




More information about the sr-dev mailing list