diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-13 21:41:14 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-13 21:41:14 +0000 |
commit | 28837b6b667608b5914e223615570688d64eef1c (patch) | |
tree | 76d1bcee3b0c4ebffb67c69d8ecf9ee4bde6836b /include | |
parent | eb11aea4dd1c7ab481610065ef2956923cad2123 (diff) |
Merged revisions 108584 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r108584 | russell | 2008-03-13 16:40:43 -0500 (Thu, 13 Mar 2008) | 19 lines
Merged revisions 108583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r108583 | russell | 2008-03-13 16:38:16 -0500 (Thu, 13 Mar 2008) | 11 lines
Fix another issue that was causing crashes in chanspy. This introduces a new
datastore callback, called chan_fixup(). The concept is exactly like the
fixup callback that is used in the channel technology interface. This callback
gets called when the owning channel changes due to a masquerade. Before this
was introduced, if a masquerade happened on a channel being spyed on, the
channel pointer in the datastore became invalid.
(closes issue #12187)
(reported by, and lots of testing from atis)
(props to file for the help with ideas)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@108585 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/channel.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index e5fd5ba81..ddba96f89 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -191,6 +191,21 @@ struct ast_datastore_info { const char *type; /*!< Type of data store */ void *(*duplicate)(void *data); /*!< Duplicate item data (used for inheritance) */ void (*destroy)(void *data); /*!< Destroy function */ + /*! + * \brief Fix up channel references + * + * \arg data The datastore data + * \arg old_chan The old channel owning the datastore + * \arg new_chan The new channel owning the datastore + * + * This is exactly like the fixup callback of the channel technology interface. + * It allows a datastore to fix any pointers it saved to the owning channel + * in case that the owning channel has changed. Generally, this would happen + * when the datastore is set to be inherited, and a masquerade occurs. + * + * \return nothing. + */ + void (*chan_fixup)(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan); }; /*! \brief Structure for a channel data store */ |