[asterisk-commits] rmudgett: branch 11 r379964 - in /branches/11: ./ main/astobj2.c

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


Author: rmudgett
Date: Tue Jan 22 18:23:26 2013
New Revision: 379964

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379964
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

Modified:
    branches/11/   (props changed)
    branches/11/main/astobj2.c

Propchange: branches/11/
------------------------------------------------------------------------------
--- branch-1.8-merged (original)
+++ branch-1.8-merged Tue Jan 22 18:23:26 2013
@@ -1,1 +1,1 @@
-/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967,379001,379145,379178,379226,379276,379310,379342,379392,379547,379608,379718,379825,379885
+/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967,379001,379145,379178,379226,379276,379310,379342,379392,379547,379608,379718,379825,379885,379963

Modified: branches/11/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/astobj2.c?view=diff&rev=379964&r1=379963&r2=379964
==============================================================================
--- branches/11/main/astobj2.c (original)
+++ branches/11/main/astobj2.c Tue Jan 22 18:23:26 2013
@@ -150,10 +150,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