fix a few more XML documentation problems
[asterisk/asterisk.git] / res / res_timing_dahdi.c
index 16b64b2..1e1150b 100644 (file)
@@ -25,6 +25,8 @@
 
 /*** MODULEINFO
        <depend>dahdi</depend>
+       <conflict>res_timing_timerfd</conflict>
+       <conflict>res_timing_pthread</conflict>
  ***/
 
 #include "asterisk.h"
@@ -36,9 +38,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
 #include <fcntl.h>
 #include <math.h>
 
+#include <dahdi/user.h>
+
 #include "asterisk/module.h"
 #include "asterisk/timing.h"
-#include "asterisk/dahdi.h"
 #include "asterisk/utils.h"
 
 static void *timing_funcs_handle;
@@ -50,6 +53,7 @@ static void dahdi_timer_ack(int handle, unsigned int quantity);
 static int dahdi_timer_enable_continuous(int handle);
 static int dahdi_timer_disable_continuous(int handle);
 static enum ast_timing_event dahdi_timer_get_event(int handle);
+static unsigned int dahdi_timer_get_max_rate(int handle);
 
 static struct ast_timing_functions dahdi_timing_functions = {
        .timer_open = dahdi_timer_open,
@@ -59,6 +63,7 @@ static struct ast_timing_functions dahdi_timing_functions = {
        .timer_enable_continuous = dahdi_timer_enable_continuous,
        .timer_disable_continuous = dahdi_timer_disable_continuous,
        .timer_get_event = dahdi_timer_get_event,
+       .timer_get_max_rate = dahdi_timer_get_max_rate,
 };
 
 static int dahdi_timer_open(void)
@@ -127,6 +132,11 @@ static enum ast_timing_event dahdi_timer_get_event(int handle)
        }
 }
 
+static unsigned int dahdi_timer_get_max_rate(int handle)
+{
+       return 1000;
+}
+
 static int dahdi_test_timer(void)
 {
        int fd;
@@ -180,9 +190,11 @@ static int load_module(void)
 
 static int unload_module(void)
 {
-       ast_uninstall_timing_functions(timing_funcs_handle);
+       /* ast_uninstall_timing_functions(timing_funcs_handle); */
 
-       return 0;
+       /* This module can not currently be unloaded.  No use count handling is being done. */
+
+       return -1;
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "DAHDI Timing Interface");