[asterisk-commits] dvossel: branch dvossel/awesomehooks r287384 - in /team/dvossel/awesomehooks:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 17 11:09:46 CDT 2010


Author: dvossel
Date: Fri Sep 17 11:09:43 2010
New Revision: 287384

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=287384
Log:
additional awesome documentation

Modified:
    team/dvossel/awesomehooks/funcs/func_awesome_trace.c
    team/dvossel/awesomehooks/include/asterisk/awesomehook.h

Modified: team/dvossel/awesomehooks/funcs/func_awesome_trace.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/awesomehooks/funcs/func_awesome_trace.c?view=diff&rev=287384&r1=287383&r2=287384
==============================================================================
--- team/dvossel/awesomehooks/funcs/func_awesome_trace.c (original)
+++ team/dvossel/awesomehooks/funcs/func_awesome_trace.c Fri Sep 17 11:09:43 2010
@@ -37,7 +37,7 @@
 /*** DOCUMENTATION
 	<function name="AWESOME_TRACE" language="en_US">
 		<synopsis>
-			View interal ast_frames as they are read and written on a channel.
+			View internal ast_frames as they are read and written on a channel.
 		</synopsis>
 		<syntax>
 			<parameter name="filter list type" required="true">
@@ -184,7 +184,7 @@
 			return 0;
 		}
 
-		*id = i; /* store off the id */
+		*id = i; /* Store off the id. The channel is still locked so it is safe to access this ptr. */
 		datastore->data = id;
 		ast_channel_datastore_add(chan, datastore);
 	}

Modified: team/dvossel/awesomehooks/include/asterisk/awesomehook.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/awesomehooks/include/asterisk/awesomehook.h?view=diff&rev=287384&r1=287383&r2=287384
==============================================================================
--- team/dvossel/awesomehooks/include/asterisk/awesomehook.h (original)
+++ team/dvossel/awesomehooks/include/asterisk/awesomehook.h Fri Sep 17 11:09:43 2010
@@ -60,8 +60,8 @@
     event proceeding the ast_awesomehook_detach() will be of type AST_AWESOMEHOOK_EVENT_DETACH,
     and that after that event occurs no other event will ever be issued for that AwesomeHook.
     Once the AwesomeHook is destroyed, the destroy callback function will be called if it was
-    provided.
-
+    provided. Note that if this function is never called, the AwesomeHook will be detached
+    on channel destruction.
 
 \section AwesomeHookAPICodeExample AwesomeHook Example Code
     The example code below attaches an AwesomeHook on a channel, and then detachs it when
@@ -115,7 +115,6 @@
     }
 \endcode
 */
-
 
 #ifndef _AST_AWESOMEHOOK_H_
 #define _AST_AWESOMEHOOK_H_
@@ -213,12 +212,16 @@
  * \brief Detach an awesomehook from a channel.
  * 
  * \note XXX The Channel must be locked during this function all.
+ * If this function is never called after attaching an awesomehook,
+ * the awesomehook will be detached and destroyed during channel
+ * destruction.
  *
  * \param The channel the awesomehook is attached to
  * \param The awesomehook's id
  *
  * \retval 0 success
- * \retval -1 awesomehook did not exist on the channel
+ * \retval -1 awesomehook did not exist on the channel. This means the
+ * awesomehook either never existed on the channel, or was already detached.
  */
 int ast_awesomehook_detach(struct ast_channel *chan, int awesomehook_id);
 




More information about the asterisk-commits mailing list