Improve timing interface to remember which provider provided a timer

The ability to load/unload timing interfaces is nice, but it means that when a timer is allocated, it may come from provider A, but later provider B becomes the 'preferred' provider. If this happens, all timer API calls on the timer that was provided by provider A will actually be handed to provider B, which will say WTF and return an error.

This patch changes the timer API to include a pointer to the provider of the timer handle so that future operations on the timer will be forwarded to the proper provider.

(closes issue #14697)
Reported by: moy

Review: http://reviewboard.digium.com/r/211/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2009-03-27 19:10:32 +00:00
parent f745326750
commit 9381bff79d
6 changed files with 126 additions and 150 deletions

View File

@@ -496,6 +496,7 @@ struct ast_channel {
char unused_old_dtmfq[AST_MAX_EXTENSION]; /*!< (deprecated, use readq instead) Any/all queued DTMF characters */
struct {
struct ast_bridge *bridge; /*!< Bridge this channel is participating in */
struct ast_timer *timer; /*!< timer object that provided timingfd */
};
};