Merged revisions 307273 via svnmerge from
authorJeff Peeler <jpeeler@digium.com>
Wed, 9 Feb 2011 21:08:22 +0000 (21:08 +0000)
committerJeff Peeler <jpeeler@digium.com>
Wed, 9 Feb 2011 21:08:22 +0000 (21:08 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r307273 | jpeeler | 2011-02-09 15:06:33 -0600 (Wed, 09 Feb 2011) | 8 lines

  Add missing debug info for ao2_link for use with REF_DEBUG in ao2 callback.

  (closes issue #18758)
  Reported by: rgagnon
  Patches:
        branch-1.8-r306540-astobj-fix.diff uploaded by rgagnon (license 1202)
        trunk-r306540-astobj-fix.diff uploaded by rgagnon (license 1202)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307274 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/astobj2.c

index 6391844..5e61d5e 100644 (file)
@@ -705,7 +705,11 @@ static void *internal_ao2_callback(struct ao2_container *c,
                         * link the object into the container that will hold the results.
                         */
                        if (ret && (multi_container != NULL)) {
                         * link the object into the container that will hold the results.
                         */
                        if (ret && (multi_container != NULL)) {
-                               __ao2_link(multi_container, ret, flags);
+                               if (tag) {
+                                       __ao2_link_debug(multi_container, ret, flags, tag, file, line, funcname);
+                               } else {
+                                       __ao2_link(multi_container, ret, flags);
+                               }
                                ret = NULL;
                        }
 
                                ret = NULL;
                        }