- Adapt to new cache argument for ast_devstate_changed()

master
MelwareDE 10 years ago
parent 20eef6a35a
commit 72111c4049
  1. 1
      CHANGES
  2. 12
      chan_capi_devstate.c
  3. 7
      create_config.sh

@ -4,6 +4,7 @@ CHANGES
HEAD
------------------
- refuse to reload on active channels
- ast_devstate_changed() changes with new cache argument
chan_capi-1.1.6

@ -113,7 +113,11 @@ void pbx_capi_chat_room_state_event(const char* roomName, int inUse)
{
if (capiChatProviderRegistered != 0) {
#ifdef CC_AST_HAS_VERSION_1_6
ast_devstate_changed((inUse != 0) ? AST_DEVICE_INUSE : AST_DEVICE_NOT_INUSE, "capichat:%s", roomName);
ast_devstate_changed((inUse != 0) ? AST_DEVICE_INUSE : AST_DEVICE_NOT_INUSE,
#ifdef CC_AST_HAS_AST_DEVSTATE_CACHE
AST_DEVSTATE_CACHABLE,
#endif
"capichat:%s", roomName);
#else
ast_device_state_changed("capichat:%s", roomName);
#endif
@ -130,7 +134,11 @@ void pbx_capi_ifc_state_event(const struct cc_capi_controller* capiController, i
((capiController->nfreebchannels >= capiController->nfreebchannelsHardThr) &&
(capiController->nfreebchannels - channelsChanged < capiController->nfreebchannelsHardThr))) {
#ifdef CC_AST_HAS_VERSION_1_6
ast_devstate_changed(AST_DEVICE_UNKNOWN, CC_MESSAGE_BIGNAME"/I%d/congestion", capiController->controller);
ast_devstate_changed(AST_DEVICE_UNKNOWN,
#ifdef CC_AST_HAS_AST_DEVSTATE_CACHE
AST_DEVSTATE_CACHABLE,
#endif
CC_MESSAGE_BIGNAME"/I%d/congestion", capiController->controller);
#else
ast_device_state_changed (CC_MESSAGE_BIGNAME"/I%d/congestion", capiController->controller);
#endif

@ -221,6 +221,13 @@ check_version_onesix()
echo "#undef CC_AST_HAS_AST_DEVSTATE2STR" >>$CONFIGFILE
echo " * obsolete devstate2str function"
fi
if grep -q "ast_devstate_changed.*ast_devstate_cache" $INCLUDEDIR/devicestate.h; then
echo "#define CC_AST_HAS_AST_DEVSTATE_CACHE" >>$CONFIGFILE
echo " * found ast_devstate_cache in ast_devstate_changed function"
else
echo "#undef CC_AST_HAS_AST_DEVSTATE_CACHE" >>$CONFIGFILE
echo " * no ast_devstate_cache in ast_devstate_changed function"
fi
if grep -q "ast_request.*requestor" $INCLUDEDIR/channel.h; then
echo "#define CC_AST_HAS_REQUEST_REQUESTOR" >>$CONFIGFILE
echo " * found requestor in ast_request"

Loading…
Cancel
Save