[asterisk-commits] russell: branch group/timing r122364 - in /team/group/timing: include/asteris...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 12 15:17:35 CDT 2008


Author: russell
Date: Thu Jun 12 15:17:34 2008
New Revision: 122364

URL: http://svn.digium.com/view/asterisk?view=rev&rev=122364
Log:
Implement dahdi_timer_ack and document the API call

Modified:
    team/group/timing/include/asterisk/timing.h
    team/group/timing/res/res_timing_dahdi.c

Modified: team/group/timing/include/asterisk/timing.h
URL: http://svn.digium.com/view/asterisk/team/group/timing/include/asterisk/timing.h?view=diff&rev=122364&r1=122363&r2=122364
==============================================================================
--- team/group/timing/include/asterisk/timing.h (original)
+++ team/group/timing/include/asterisk/timing.h Thu Jun 12 15:17:34 2008
@@ -74,12 +74,23 @@
 	/*!
 	 * \brief Close an opened timing handle
 	 *
-	 * \arg handle timing handle returned from timer_open()
+	 * \arg handle timing fd returned from timer_open()
 	 *
 	 * \return nothing
 	 */
 	void (*timer_close)(int handle);
 
+	/*!
+	 * \brief Acknowledge a timer event
+	 *
+	 * \arg handle timing fd returned from timer_open()
+	 * \arg quantity number of timer events to acknowledge
+	 *
+	 * \note This function should only be called if timer_get_event()
+	 *       returned AST_TIMING_EVENT_EXPIRED.
+	 *
+	 * \return nothing
+	 */
 	void (*timer_ack)(int handle, unsigned int quantity);
 
 	int (*timer_enable_continuous)(int handle);

Modified: team/group/timing/res/res_timing_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/group/timing/res/res_timing_dahdi.c?view=diff&rev=122364&r1=122363&r2=122364
==============================================================================
--- team/group/timing/res/res_timing_dahdi.c (original)
+++ team/group/timing/res/res_timing_dahdi.c Thu Jun 12 15:17:34 2008
@@ -91,6 +91,11 @@
 
 static void dahdi_timer_ack(int handle, unsigned int quantity)
 {
+	int unused;
+
+	while (quantity-- && !ioctl(handle, DAHDI_TIMERACK, &unused)) {
+		;
+	}
 }
 
 static int dahdi_timer_enable_continuous(int handle)




More information about the asterisk-commits mailing list