mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-28 07:01:07 +00:00
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -150,10 +150,12 @@ static inline struct astobj2 *INTERNAL_OBJ(void *user_data)
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user