[asterisk-commits] rmudgett: trunk r379966 - in /trunk: ./ main/astobj2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 22 18:30:03 CST 2013


Author: rmudgett
Date: Tue Jan 22 18:30:00 2013
New Revision: 379966

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379966
Log:
Attempt to be more helpful when using a bad ao2 object pointer.

Put the external obj pointer in the message instead of the internal version.
........

Merged revisions 379963 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 379964 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/main/astobj2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=379966&r1=379965&r2=379966
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Tue Jan 22 18:30:00 2013
@@ -159,10 +159,12 @@
 	p = (struct astobj2 *) ((char *) user_data - sizeof(*p));
 	if (AO2_MAGIC != p->priv_data.magic) {
 		if (p->priv_data.magic) {
-			ast_log(LOG_ERROR, "bad magic number 0x%x for %p\n", p->priv_data.magic, p);
+			ast_log(LOG_ERROR, "bad magic number 0x%x for object %p\n",
+				p->priv_data.magic, user_data);
 		} else {
 			ast_log(LOG_ERROR,
-				"bad magic number for %p. Object is likely destroyed.\n", p);
+				"bad magic number for object %p. Object is likely destroyed.\n",
+				user_data);
 		}
 		return NULL;
 	}




More information about the asterisk-commits mailing list