[svn-commits] akshayb: branch akshayb/ao2_containers r266236 - /team/akshayb/ao2_containers...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 26 19:03:10 CDT 2010


Author: akshayb
Date: Wed May 26 19:03:09 2010
New Revision: 266236

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266236
Log:
Day3 Commit: Partial commit, Not all changes added because of errors.

Modified:
    team/akshayb/ao2_containers/main/astobj2.c

Modified: team/akshayb/ao2_containers/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/team/akshayb/ao2_containers/main/astobj2.c?view=diff&rev=266236&r1=266235&r2=266236
==============================================================================
--- team/akshayb/ao2_containers/main/astobj2.c (original)
+++ team/akshayb/ao2_containers/main/astobj2.c Wed May 26 19:03:09 2010
@@ -650,6 +650,7 @@
 		if (!(multi_container = __ao2_container_alloc(1, NULL, NULL))) {
 			return NULL;
 		}
+// This part dosen't needs to be corrected as, it will be automatically corrected once we correct the ao2_iterator.
 		if (!(multi_iterator = ast_calloc(1, sizeof(*multi_iterator)))) {
 			ao2_ref(multi_container, -1);
 			return NULL;
@@ -680,14 +681,14 @@
 	 * (this only for the time being. We need to optimize this.)
 	 */
 	if ((flags & OBJ_POINTER))	/* we know hash can handle this case */
-		start = i = c->hash_fn(arg, flags & OBJ_POINTER) % c->n_buckets;
+		start = i = c->var.hash_fn(arg, flags & OBJ_POINTER) % c->var.n_buckets;
 	else			/* don't know, let's scan all buckets */
 		start = i = -1;		/* XXX this must be fixed later. */
 
 	/* determine the search boundaries: i..last-1 */
 	if (i < 0) {
 		start = i = 0;
-		last = c->n_buckets;
+		last = c->var.n_buckets; // This get changed
 	} else if ((flags & OBJ_CONTINUE)) {
 		last = c->n_buckets;
 	} else {
@@ -700,7 +701,7 @@
 		/* scan the list with prev-cur pointers */
 		struct bucket_entry *cur;
 
-		AST_LIST_TRAVERSE_SAFE_BEGIN(&c->buckets[i], cur, entry) {
+		AST_LIST_TRAVERSE_SAFE_BEGIN(&c->var.buckets[i], cur, entry) {
 			int match = (CMP_MATCH | CMP_STOP);
 
 			if (type == WITH_DATA) {




More information about the svn-commits mailing list