From 5a1f7d897e1381e17edd9cc54271bb4ec2e3a56e Mon Sep 17 00:00:00 2001 From: russell Date: Thu, 26 Jun 2008 15:37:01 +0000 Subject: - add get_max_rate timing API call - change ast_settimeout() to honor max rate in edge cases of file playback (this will make some warning messages go away at the end of playing back a file) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125332 f38db490-d61c-443f-a65b-d21fe96a405b --- main/timing.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'main/timing.c') diff --git a/main/timing.c b/main/timing.c index 5f6023203..982186706 100644 --- a/main/timing.c +++ b/main/timing.c @@ -46,6 +46,7 @@ void *ast_install_timing_functions(struct ast_timing_functions *funcs) !funcs->timer_set_rate || !funcs->timer_ack || !funcs->timer_get_event || + !funcs->timer_get_max_rate || !funcs->timer_enable_continuous || !funcs->timer_disable_continuous) { return NULL; @@ -198,6 +199,19 @@ enum ast_timing_event ast_timer_get_event(int handle) return result; } +unsigned int ast_timer_get_max_rate(int handle) +{ + unsigned int res; + + ast_rwlock_rdlock(&lock); + + res = timer_funcs.timer_get_max_rate(handle); + + ast_rwlock_unlock(&lock); + + return res; +} + static char *timing_test(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { int fd, count = 0; -- cgit v1.2.3