[asterisk-commits] REF DEBUG: Prevent logging of container node objects. (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 8 06:46:59 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

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(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved



diff --git a/main/astobj2_hash.c b/main/astobj2_hash.c
index 1cd6ee2..341ff79 100644
--- a/main/astobj2_hash.c
+++ b/main/astobj2_hash.c
@@ -298,7 +298,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_ref(node, -1);
 					return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 				}
 			}
@@ -331,7 +331,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_ref(node, -1);
 					return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 				}
 			}
diff --git a/main/astobj2_rbtree.c b/main/astobj2_rbtree.c
index d8195d4..a8d5e3a 100644
--- a/main/astobj2_rbtree.c
+++ b/main/astobj2_rbtree.c
@@ -1267,7 +1267,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_ref(node, -1);
 		return AO2_CONTAINER_INSERT_NODE_OBJ_REPLACED;
 	}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4fded84e8a1a58b3a59ce59dfd7eb0da3ddc5d4
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list