Commit Graph

8 Commits

Author SHA1 Message Date
Mark Michelson
7d174a1daf Prevent duplicate sorcery wizards from being applied to sorcery object types.
This commit contains several changes to sorcery:

1) Application of sorcery configuration based on module name is automatically performed
when sorcery is opened for a module.
2) Sorcery will not attempt to apply the same wizard to an object type more than once.
3) Sorcery gives more exact results when attempting to apply a wizard, whether as the
default or based on configuration.

Sorcery unit tests still pass for me after making these changes.

Review: https://reviewboard.asterisk.org/r/3326



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 17:52:39 +00:00
Mark Michelson
2a48cbd86c Revert changes to sorcery that accidentally got committed.
These changes were still up for review and have not been approved
yet. I must have had the changes in my working copy when making
a different change.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 18:36:05 +00:00
Mark Michelson
e4d161e03c Fix stuck channel in ARI through the introduction of synchronous bridge actions.
Playing back a file to a channel in an ARI bridge would attempt to wait until
the playback concluded before returning. The method used involved signaling the
waiting thread in the ARI custom playback function.

The problem with this is that there were some corner cases that were not accounted for:
* If a bridge channel could not be found, then we never would attempt the playback but
  would still attempt to wait for the playback to complete.
* If the bridge playfile action failed to queue, we would still attempt to wait for the
  playback to complete.
* If the bridge playfile action were queued but some circumstance caused the playback
  not to occur (the bridge dies, the channel is removed from the bridge), then we would
  never be notified.

The solution to this is to move the waiting logic into the bridge code. A new bridge
API function is added to queue a synchronous action on a bridge. The waiting thread
is notified when the queued frame has been freed, either due to an error occurring
or due to successful playback. As a failsafe, the waiting thread has a 10 minute
timeout just in case there is a frame leak somewhere.

Review: https://reviewboard.asterisk.org/r/3338



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 16:52:12 +00:00
Mark Michelson
81f55d47e7 Fix failing realtime sorcery tests.
The store realtime callback needs to return a positive value for
sorcery to treat the store as a success.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 21:55:45 +00:00
Mark Michelson
b24cb88190 Make res_sorcery_realtime filter unknown retrieved results.
When retrieving data from a database or other realtime backend, it's quite
possible to retrieve variables that Asterisk does not care about but that
are legitimate to exist. Asterisk does not need to throw a hissy fit when
these variables are encountered but rather just filter them out.

Review: https://reviewboard.asterisk.org/r/3305



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:03:57 +00:00
Matthew Jordan
31ab486627 Fix sorcery unit tests
When strict XML documentation checking was re-enabled, the test objects used in
sorcery would fail to register as the types were not marked internal and the
nodoc option wasn't used for the options. This fixes that problem, such that,
as one would hope, they once again pass.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 18:10:11 +00:00
Joshua Colp
c3f9ddc9ad Add missing ast_sorcery_generic_alloc conversions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-23 13:24:18 +00:00
Joshua Colp
02be50b1ac Add support for a realtime sorcery module.
This change does the following:

1. Adds the sorcery realtime module
2. Adds unit tests for the sorcery realtime module
3. Changes the realtime core to use an ast_variable list instead of variadic arguments
4. Changes all realtime drivers to accept an ast_variable list

Review: https://reviewboard.asterisk.org/r/2424/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-27 12:01:29 +00:00