add configure flag to turn on legacy coredb behavior
This commit is contained in:
parent
a5acfa218c
commit
603f3eff97
|
@ -425,6 +425,13 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(deprecated-core-db-events,
|
||||
[AS_HELP_STRING([--enable-deprecated-core-db-events], [Keep deprecated core db events])],,[enable_deprecated_core_db_events="no"])
|
||||
|
||||
if test x"$enable_deprecated_core_db_events" = x"yes" ; then
|
||||
AC_DEFINE([SWITCH_DEPRECATED_CORE_DB], [1], [Define to 1 to enable deprecated core db events])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(timerfd-wrapper,
|
||||
[AC_HELP_STRING([--enable-timerfd-wrapper],[timerfd is in the kernel but not in your libc])],[enable_timer_fd_wrapper="$enableval"],[enable_timer_fd_wrapper="no"])
|
||||
AM_CONDITIONAL([ENABLE_TIMERFD_WRAPPER],[test "x$enable_timer_fd_wrapper" != "xno"])
|
||||
|
|
|
@ -1973,14 +1973,18 @@ static void core_event_handler(switch_event_t *event)
|
|||
case CS_NEW:
|
||||
case CS_DESTROY:
|
||||
case CS_REPORTING:
|
||||
//case CS_HANGUP: /* marked for deprication */
|
||||
#ifndef SWITCH_DEPRECATED_CORE_DB
|
||||
case CS_HANGUP: /* marked for deprication */
|
||||
#endif
|
||||
case CS_INIT:
|
||||
break;
|
||||
#ifdef SWITCH_DEPRECATED_CORE_DB
|
||||
case CS_HANGUP: /* marked for deprication */
|
||||
new_sql_a() = switch_mprintf("update channels set state='%s' where uuid='%s'",
|
||||
switch_event_get_header_nil(event, "channel-state"),
|
||||
switch_event_get_header_nil(event, "unique-id"));
|
||||
break;
|
||||
#endif
|
||||
case CS_EXECUTE:
|
||||
if ((extra_cols = parse_presence_data_cols(event))) {
|
||||
new_sql() = switch_mprintf("update channels set state='%s',%s where uuid='%q'",
|
||||
|
|
Loading…
Reference in New Issue