[Asterisk-code-review] REF DEBUG: Prevent logging of container node objects. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Jul 7 12:48:55 CDT 2016


Corey Farrell has uploaded a new change for review.

  https://gerrit.asterisk.org/3160

Change subject: REF_DEBUG: Prevent logging of container node objects.
......................................................................

REF_DEBUG: Prevent logging of container node objects.

Using AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE can result in an unref being
recorded to the refs log for the node being replaced.  This prevents
logging of those unrefs since they would produce errors in
refcounter.py.

ASTERISK-26181 #close

Change-Id: Ie4fded84e8a1a58b3a59ce59dfd7eb0da3ddc5d4
---
M main/astobj2_hash.c
M main/astobj2_rbtree.c
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/60/3160/1

diff --git a/main/astobj2_hash.c b/main/astobj2_hash.c
index b036911..072cd18 100644
--- a/main/astobj2_hash.c
+++ b/main/astobj2_hash.c
@@ -274,7 +274,7 @@
 					break;
 				case AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE:
 					SWAP(cur->common.obj, node->common.obj);
-					ao2_t_ref(node, -1, "Discard the new node.");
+					ao2_t_ref(node, -1, NULL);
 					return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 				}
 			}
@@ -307,7 +307,7 @@
 					break;
 				case AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE:
 					SWAP(cur->common.obj, node->common.obj);
-					ao2_t_ref(node, -1, "Discard the new node.");
+					ao2_t_ref(node, -1, NULL);
 					return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 				}
 			}
diff --git a/main/astobj2_rbtree.c b/main/astobj2_rbtree.c
index b06813d..03efd88 100644
--- a/main/astobj2_rbtree.c
+++ b/main/astobj2_rbtree.c
@@ -1243,7 +1243,7 @@
 		break;
 	case AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE:
 		SWAP(cur->common.obj, node->common.obj);
-		ao2_t_ref(node, -1, "Don't need the new node.");
+		ao2_t_ref(node, -1, NULL);
 		return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/3160
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4fded84e8a1a58b3a59ce59dfd7eb0da3ddc5d4
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>



More information about the asterisk-code-review mailing list