[sr-dev] [kamailio] rtpengine: hash table to keep the selected nodes (#390)

Stefan Mititelu notifications at github.com
Thu Nov 12 11:11:14 CET 2015


> +	}
> +
> +	// get first entry from entry list; jump over unused list head
> +	hash_index = str_hash(key);
> +	entry = rtpengine_hash_table->entry_list[hash_index];
> +	last_entry = entry;
> +
> +	// lock
> +	lock_get(rtpengine_hash_lock);
> +	while (entry) {
> +		// if key found, return entry
> +		if (str_equal(&entry->callid, (str *)key)) {
> +			// unlock
> +			lock_release(rtpengine_hash_lock);
> +
> +			return entry;

True, I'll return just the node.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/390/files#r44639943
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151112/c02b2192/attachment.html>


More information about the sr-dev mailing list